Angelo Mathews top scored with an unbeaten 85 on Sunday, supported by half-centuries from three other batsmen, to put Sri Lanka in command of the third test against Australia as the hosts reached 428-6 at stumps on the third day.
Resuming the day 150 behind, Sri Lanka ended with a first-innings lead of 112 runs in reply to Australia's 316.
Captain Tillakaratne Dilshan (83), Kumar Sangakkara (79) and Mahela Jayawardene (51) all got half-centuries and built key partnerships on a good batting pitch at the Sinhalese Sports Club.
Mathews shared 121 runs with Dilshan for the second century partnership of the innings, after Sangakkara and Jayawardene had put on 101. Mathews was closing in on a maiden test century that has eluded him twice having got out for 99 and 95. He had faced 207 balls and hit eight boundaries.
Dilshan was out caught behind by Brad Haddin off seamer Trent Copeland. Normally an opener, Dilshan dropped himself to No. 5 in the batting order and faced 131 balls, hitting 14 boundaries in an aggressive innings.
Sri Lanka started the day on 166-2 and lost Jayawardene (51) caught behind by Haddin off seamer Shane Watson. He faced 120 balls and hit nine boundaries. Peter Siddle snared Sangakkara (79) in the same fashion.
Australian bowlers toiled on a batting-friendly pitch without a wicket for most of the second session with captain Michael Clarke even using part-time bowler and former captain Ricky Ponting.
"Obviously it's going to be really tough for us to win from here. It's a tough position," Siddle said. "Definitely tomorrow morning I think the best we can do is to come out five overs away from the new ball, get one or two [wickets] before the new ball and quickly tie it up. And go out and bat as hard as we can, fight as best as we can for the next couple of days."
Copeland also dismissed Prasanna Jayawardene for 47 caught by Michael Clarke.
Copeland returned 2-70 while Siddle had 2-76.
Sri Lanka openers Tharanga Paranavitana (46) and Lahiru Thirimanne (28) were dismissed on Saturday.
Australia was bowled out on Saturday with Mike Hussey scoring 118, his second century of the series after top scoring with 142 in the second test.
Australia leads the three-match series 1-0.