(CNN) -- Tourists New Zealand will be battling to avoid defeat on the final day of the first cricket Test against Sri Lanka in Galle.
Dilshan celebrates his ninth Test century as he passes three figures at Galle.
The tourists have been set an unlikely 413 for victory and struggled to 30 for one wicket by the close of the fourth day.
Tillakaratne Dilshan had finished on 123 not out as Sri Lanka declared their second innings on 259 for four wickets at tea to set the Kiwis the tough target.
New Zealand have been further hit by illness with Jesse Ryder and wicket-keeper Brendon McCullum battling a stomach bug.
They took no part on Friday and are struggling to bat on the final day if required.
The Kiwis main hope of saving the match may rest with the weather, with rain stopping play after tea and more forecast for the final day.
Opener Daniel Flynn was the man to go, caught behind in the slips off the bowling of Nuwan Kulasekara.
Martin Guptill was unbeaten on 17 and Ross Taylor was on eight when bad light stopped play.
New Zealand had resumed their first innings at the start of the day on 281 for eight and they added only a further 18 to be all out for 299 in reply to Sri Lanka's first knock of 452. Thilan Thushara and Muttiah Muralitharan finished with four wickets each.
Muralitharan, the leading all-time wicket taker in Test cricket, took his tally to 774 when he had Iain O'Brien caught behind to claim his 100th wicket at Galle.
Sri Lanka rattled up the runs in their second innings to set up the declaration, with Dilshan moved up to open to hit his ninth Test century.
It followed his brilliant 92 in the first innings. He added 101 runs for the second wicket with skipper Kumar Sangakkara (46) and 54 for the third with Mahela Jayawardene.