Australia may have a fight on their hands to seal a rare subcontinent series win against Sri Lanka after a see-sawing first day of the second Test in Galle.
Nathan Lyon (3-78) and Mitch Starc (3-37) were Australia's key men on a hot Thursday, the former orchestrating a Sri Lankan collapse before tea and the latter coming just short of a hat-trick after it.
In another highlight, Steve Smith entered the record books with his 197th Test catch - the most for any Australian, excluding wicketkeepers.
But the hosts improved on a dismal performance in the series opener, finally able to piece together partnerships on a dusty wicket already turning plenty.
They finished the day at 9-229, with the deck likely to become very tricky for the batters as the Test goes on.
"It is pretty tight," Australian bowling coach Dan Vettori said of the state of play.
"We anticipate the wicket coming to the fore in terms of those footmarks and it breaking up, becoming quite dusty.
"It was an attritional day. We probably anticipated the wicket doing a little bit more, it was incredibly dry compared to the first Test wicket so we thought that it would start to break up, which it has now."
Kusal Mendis (59) and Lahiru Kumara, yet to score, were unbeaten at the close, the former batting with the kind of tenacity rarely seen from Sri Lanka in the first Test.
Batting coach Thilina Kandamby felt Sri Lanka could have been further ahead of the game.
"Anything over 350 would have been ideal. Now we're already nine down, but still, 'Menda' is there," he said.
"He has all the shots so I hope that he'll try and score a few more runs. More than 275 in total would be ideal."
Lyon starred in a collapse of 4-34 that helped Australia regain control after Sri Lanka had won an important toss and gone to lunch at 1-87 largely thanks to Dinesh Chandimal (74).
Australia had to work hard for their breakthroughs either side of that collapse, bringing to mind the decision to drop third front-line spinner Todd Murphy.
Australia axed Murphy to hand a Test debut to allrounder Cooper Connolly (0-12), who will provide extra batting firepower in the tough conditions but bowled only three overs on the first day of his Test career.
"The game will speed up in the second innings and there'll be ample opportunities for 'Coop' to come in," Vettori said.
Lyon needed only 10 minutes to swing momentum in Australia's favour after lunch.
He bowled around the wicket and snuck past the bat of retiring opener Dimuth Karunaratne (36) to break an impressive 70-run stand with Chandimal.
Fellow veteran Angelo Mathews (one off 26 balls) never looked comfortable replacing Karunaratne and walked immediately after edging Lyon to Alex Carey.
Lyon is now only one wicket away from becoming the seventh man to reach 550 Test scalps, and third Australian after Shane Warne (708) and Glenn McGrath (563).
Starc came within inches of a hat-trick as he broke a 65-run partnership between Kusal and Ramesh Mendis (28) that had pulled Sri Lanka back off the canvas after tea.
With the new ball, the big left-armer enticed Ramesh into toeing behind to Alex Carey, before Prabath Jayasuriya edged to the slips first ball to continue an unhappy series with the bat.
Smith held onto Jayasuriya, overtaking fielding guru Ricky Ponting to become Australia's most prolific gloveless catcher in Tests.
A classic Starc outswinger beat Nishan Peiris on the next ball, as the veteran just missed becoming the first Australian to take a hat-trick since Peter Siddle in 2010.
It came after Carey stumped Chandimal off left-armer Matthew Kuhnemann (2-52) just after tea to mark another momentum shift in an intriguing first day.
Back stiffness prevented Josh Inglis from fielding in the third session but the batter is expected to return on day two.