Phil Hughes and David Warner got the hosts off at a canter on a glorious morning with half centuries in a partnership of 130 as Australia looked to build a big total in their bid to sweep the series 3-0.
Two run outs, including one for Mike Hussey in his final Test, and a couple of soft dismissals, however, left Sri Lanka bowling at Matthew Wade, who had survived a good few scares to reach 47, and Peter Siddle (16) when stumps were drawn.
Australia captain Michael Clarke also made 50 but will probably remember the day more for having given the call for the risky single that saw Hussey dismissed for 28 by Dimuth Karunaratne's direct hit.
"Today we could look back and feel we could have been in a better position, it would have been nice to have a couple of wickets less," said Hughes, who hit a stylish 87, said.
"But that's the position we're in now, 40-odd run lead and we're well balanced in this game."
Sri Lanka, who made 294 in their first innings, showed considerably more fight than they had in the innings and 201 run defeat in Melbourne last week and they were only a couple of dropped catches from being right back in the match.
"A number of young players have come in and shown that they've got some guts and the desire to play at this level," coach Graham Ford said.
"On the other hand... we might have been in a better position. Although we're still in the game, we could have been in quite a powerful position."
Hughes and Warner, who hit a pugnacious 85, had plundered runs in the opening session against a patched-up pace attack in almost perfect batting conditions.
The only wicket to fall before lunch was that of opener Ed Cowan, who gave a precursor of what was to come when he ran himself out for four.
Sri Lanka skipper Mahela Jayawardene finally introduced spinner Rangana Herath after the break and the most prolific wicket-taker in Test cricket last year almost had an immediate impact with a strong lbw appeal against Warner.
It was turned down and a TV appeal showed the ball was turning too much to hit the leg stump but half an hour later the opener was heading back to the dressing room.
The 26-year-old, who had reached his half century off just 37 balls, could not resist a slash at a Tillakaratne Dilshan delivery only for the ball to balloon up into the air for Dhammika Prasad to take the catch backtracking at long-on.
Hughes had shown that for all the rebuilding of his technique he could still cut the ball like few other batsmen but on 87, traditionally considered unlucky for Australian batsmen, he tried another and was caught behind off Herath.
Hussey, who will retire from international cricket after this match, received a huge ovation from the crowd as he came out to bat and was welcomed to the crease by a guard of honour from the Sri Lankan players.
It was Clarke who caught the eye, however, and he punished anything loose from the Sri Lankan bowlers, most notably when he hit a towering six and a lofted four off Herath in consecutive balls just before tea.
The captain turned villain in the fourth over after the break, however, when he called for the single that resulted in Hussey's dismissal, and put a dent in the 37-year-old's previous average of 117.75 against Sri Lanka and 100 at the SCG.
Clarke, the most prolific batsman of last year, reached his 25th half century with a single through the covers but an over later his first innings of 2013 was ended when he misfired a sweep off Herath and Karunaratne took a good catch on the run.
Wade was dropped, then survived a Sri Lanka TV appeal for a catch which was ruled out for a no ball and finally forced to resort to the TV umpire himself to overturn a decision that he had been caught out -- all while he was on 22.
Nuwan Pradeep grabbed the final wicket of the day when he had Mitchell Johnson caught behind for 13 - only a second Test wicket for the Sri Lankan seamer whose average had soared above 400 during the day's play.
- Sports & Recreation
- Sri Lanka
- Mike Hussey