PALLEKELE, Sri Lanka (AP) " Spinners accounted for three of Australia's top order wickets to put Sri Lanka in command of the first test on Friday as the tourists, chasing 268 to win, reached 83 for three when bad light forced an early end to the fourth day.
Rangana Herath got the first breakthrough by bowling opener David Warner for one with the total on two. Warner was dismissed without scoring in the first innings.
Dilruwan Perera had Usman Khawaja lbw for 18 and Lakshan Sandakan bowled out Joe Burns for 29 with a sharp turner to put Australia in trouble at 63-3.
Captain Steve Smith " 26 not out " and Adam Voges (unbeaten on nine) then weathered a tough spell as the scoring rate dropped.
Voges, top scorer for Australia in the first innings with 47, successfully reviewed an lbw decision by English umpire Richard Kettleborough when he was yet to score.
Australia faces a challenging task of scoring 185 more runs with seven wickets in hand on a Pallekele pitch offering help for spin bowlers. However they can seek inspiration from Pakistan's chase of 377 to win a test match on this ground against Sri Lanka last year.
But Australia's batting coach Stuart Law said his team is confident of a win.
"We are still confident. We always want to play to win and not to draw,'" Law said.
"Only one ball has so far spun so sharply to get rid of Joe Burns. The rest have been ok and our boys have batted well using their feet."
"History says that teams have chased big totals before. This one (the pitch) doesn't look like deteriorating a great deal," he said.
Sri Lanka will be looking for only their second win against Australia on Saturday with their sole win coming in 1999 under Sanath Jayasuriya. The two countries have played 26 tests so far with Australia winning 17 of them.
"Think we've fought really hard to get ourselves into a situation when we can win this test match. Pleasingly, a few balls started to turn quite sharply before the players came off for bad light," Sri Lanka coach Graham Ford said.
"Hoping tomorrow that a few things will go our way, and we'll be able to press home and hopefully finish off with a big victory."
Bad weather could also prevent a result in the match with more than four sessions already lost.
Australia is also reduced to a 10-man team with their left-arm spin bowler Steve O'Keefe being ruled out of the tour because of a hamstring injury he sustained on Thursday.
He will return home after the match and uncapped left-arm spinner Jon Holland from Victoria has been called up as a replacement. He's likely to make his international debut in the second test in Galle, according to a statement from Cricket Australia.
"It is incredibly disappointing for Steve to get this injury and I really feel for him. He was bowling well in the test and had caused some trouble to Sri Lanka's top order," the statement quoted national selector Rod Marsh as saying.
O' Keefe took three wickets in the match.
"The selectors have decided to go for a like-for-like replacement for Steve, in Jon Holland," Marsh said adding that Holland had a successful domestic season in Australia.
Earlier, batsman Kusal Mendis made 176 to lift Sri Lanka from a precarious position to a more commanding one. Sri Lanka was trailing Australia by 86 runs in the first innings and slumped to 86-4 before Mendis turned the innings around.
Fast bowler Mitchell Starc finally dismissed Mendis during a rain-shortened morning session, having him caught behind by Peter Nevill. Mendis batted for more than five hours and hit 21 fours and a six off-spinner Nathan Lyon which brought up his century.
His 117-run stand for the fifth wicket with Dinesh Chandimal (45) and 71-run partnership for the sixth wicket with Dhananjaya de Silva (36) proved crucial for Sri Lanka and turned the pressure back onto Australia.
Mendis is the youngest Sri Lankan to score a century against Australia and his innings is the second-highest score by a Sri Lankan against Australia after Kumar Sangakkara's 192 in 2007.
Batting at No. 9, Herath contributed a valuable 35 runs off 34 balls " including six fours " to help Sri Lanka stretch the lead.
Starc returned 4-84 while paceman Josh Hazlewood had 2-59.
Sri Lanka was dismissed for 117 in its first innings and Australia made 203.
This story has been automatically published from the Associated Press wire which uses US spellings