Sri Lanka made progress towards a mammoth target of 388, after Sikandar Raza completed a maiden Test century to put Zimbabwe on course for victory in Colombo.
Malcolm Waller (68) and captain Graeme Cremer (48) offered impressive contributions as Zimbabwe added 125 runs to their overnight score, eventually falling 377 all out as Rangana Herath completed his eighth 10-wicket haul in Tests - only Richard Hadlee, Shane Warne and Muttiah Muralitharan have more.
Raza was the star of the show, though, keeping his composure after spending overnight on 97 not out and quickly securing a first Test ton with the second ball of the day. Sri Lanka moved to within 218 runs of victory on 170-3 at stumps, but remain in need of a record total to win.
Though Waller gave his wicket away to Kusal Perera, and Raza was also guilty of poor shot selection when his fine knock of 127 was ended by a Herath slider, Zimbabwe's batting looks to have secured just their third Test victory away from home.
But Cremer and Donald Tiripano went on, as Sri Lanka had to contemplate outdoing the efforts of their 2006 vintage, who knocked off a record 352 to beat South Africa here.
Once the Zimbabwean tail's significant wag was quelled, Dimuth Karunaratne and Upul Tharanga set about building a platform for any potential record-breaking, but an opening stand of 58 was snapped when the latter was outfoxed by Cremer on 27 and saw an edge loop off the pad to short leg.
Cremer did not once turn to seam on a slow and low surface, with Sean Williams bowling Karunaratne (49) and Sri Lanka captain Dinesh Chandimal (15) falling to his opposite number for the second time in the Test.
But Perera looked solid as he made it to 60 without any significant scares. His and Angelo Mathews' (17 not out) efforts on the fifth morning could shape an epic final day.