Sri Lanka put on a determined batting display on Sunday to improve their chances of forcing a draw in the second Test against Australia.
Sri Lanka, who were shot out for 174 in the first innings, moved to 223-2 in their second knock before bad light ended play an hour early on the fourth day at the Pallekele International Stadium.
Former captains Kumar Sangakkara (69) and Mahela Jayawardene (38) were together at the crease, having put on 95 valuable runs so far for the third wicket.
Sri Lanka, who trail 1-0 in the three-match series, will start the final day's play on Monday just 14 runs behind Australia, and with eight wickets in hand on a good batting pitch.
Australia captain Michael Clarke, worried over forecasts of bad weather, had declared his team's first innings at an overnight score of 411-7 in order to bid for a victory.
Rain and bad light allowed 79 of the stipulated 98 overs on Sunday, but heavy thundershowers have been forecast on the fifth day.
Australia's hopes of terminating Sri Lanka's innings quickly rest on the second new ball which will be available after one more over.
Sri Lanka's openers Tillakaratne Dilshan and Tharanga Paranavitana (55) put on 81 for the first wicket, their best partnership of the series so far after stands of four, zero and two in the previous three outings.
Under bright skies they warded off the early threat from the Australian seamers.
But Dilshan undid the good work just before lunch with a wild heave, soon after a five-minute stoppage due to bad light.
The captain, who looked settled in on 36, drove at a wide ball outside the off-stump from seamer Ryan Harris but only managed to edge a catch to Shane Watson at first slip.
Paranavitana went on to compile his eighth Test half century before falling to a controversial decision by third umpire Aleem Dar.
The left-hander played defensively to Mike Hussey and the ball lodged in the gloves of wicket-keeper Brad Haddin, who was the only one to appeal for a catch.
When umpire Tony Hill turned down the appeal, the Australians asked for - and received - a favourable review from Dar, even though television replays proved inconclusive.
Sangakkara, preparing for his 100th Test match next week, mastered the Australian bowlers to hit eight boundaries. The more circumspect Jayawardene had three fours.
The tourists are looking to clinch the three-match series on their first Test tour of Sri Lanka since 2004 after winning the opening contest in Galle by 125 runs.