Thilan Samaraweera hit a half-century under pressure to lead Sri Lanka's recovery on the third day of the second and final Test against New Zealand at the P. Sara Oval in Colombo on Tuesday.
Sri Lanka were in big trouble on 103-5 before finishing the day on 225-6 in reply to New Zealand's first-innings 412, thanks to the middle-order batsman's defiant 76 not out off 156 deliveries.
Samaraweera, who had injured his finger while fielding, received valuable support from lower-order batsman Suraj Randiv, who made a resolute 102-ball 34 not out, his highest score in 12 Tests.
The pair had added 97 and helped their team avoid the follow-on when bad light stopped play with 25.4 overs remaining in the day, but the tourists were in control.
Sri Lanka, leading the series 1-0 following their 10-wicket win in the opening Test, were still 187 behind with four wickets in hand.
"He (Samaraweera) didn't take an injection but took some oral pain killers. He had some strapping and some stitches yesterday," said Sri Lanka coach Graham Ford.
"It hasn't been comfortable for him but it goes on to prove how tough the man is both mentally and physically. He got out there and did the job for us.
"I am feeling a lot happier than I was in the first session. It's been pleasing to see the way the boys dug deep and fought really hard to get us into a much more respectable position."
Fast bowler Tim Southee, who took two wickets in an over on Monday, had Sri Lanka -- resuming on 43-3 -- in trouble in the morning when he struck twice before Samaraweera and Randiv steadied the innings.
"It would have been nice to have a couple of more (wickets) today to really get into their tail, but it's a tough batting line-up. They keep coming one after another and it just shows their great batting depth," said Southee.
"It's a massive hour tomorrow morning and if we can pick a couple of wickets and run through them, then who knows. I hope we can make the most of the position we got them in."
Angelo Mathews and opener Tharanga Paranavitana put on 90 after three wickets had fallen for just 12 on Monday but Southee dismissed them in successive overs.
Paranavitana (40) edged the paceman to wicket-keeper Kruger van Wyk while Mathews (47) fell to a superb one-handed catch by Martin Guptill, who held the ball low to his right in the slips.
New Zealand had wasted an earlier chance to break the fourth-wicket stand when skipper Ross Taylor dropped Paranavitana at first slip off fast bowler Trent Boult when the batsman was on 32.
Mathews played some aggressive shots in the morning, lofting off-spinner Jeetan Patel over wide long-on for the first six of the innings and then cutting the bowler past point for four.
Southee had taken four wickets for 51 off 19 overs by the close of play.