Sri Lanka beat Zimbabwe by four wickets after chasing a record 388 on the fifth and final day of the one-off Test Tuesday.
The hosts rode on a crucial 121-run sixth-wicket stand between Asela Gunaratne (80 not out) and Niroshan Dickwella (81) to pull off the team's best-ever run chase.
The win in Colombo was a boost for new Test captain Dinesh Chandimal and eased Sri Lanka's pain after a shock defeat in the one-day series against the minnows.
Niroshan Dickwella struck a defiant half-century to keep Sri Lanka's chase alive after Zimbabwe skipper Graeme Cremer took two wickets.
Chasing 388 for victory, Sri Lanka were 270-5 at lunch with Dickwella (56) batting alongside Asela Gunaratne (26) at the R. Premadasa Stadium.
The hosts, who suffered a shock defeat in the preceding one-day series against the minnows, will still have to dig deep to claim the 118 runs needed for the win.
Sri Lanka's highest-ever successful run chase was against South Africa in 2006, when they achieved their 352-run target in Colombo.
Cremer, who took his match tally to nine wickets, got overnight batsman Kusal Mendis trudging back to the pavilion for 66 after Sri Lanka resumed the day on 170-3.
Cremer, who had taken two wickets in the final session on day four, struck again with his leg-spin to have Angelo Mathews caught and bowled for 25.
Dickwella and Gunaratne then put on an unbeaten 67-run stand to keep a persistent Zimbabwe bowling attack at bay for the rest of the morning session.
Dickwella got lucky on 37 after wicketkeeper Regis Chakabva clipped the bails on Sikandar Raza's off-spin, sending the stumping decision to the third umpire.
Repeated replays showed the left-handed batsman had his toe on the crease -- a case where the batsman should be given out, but India's Chettithody Shamshuddin let Dickwella stay, much to the dismay of the Zimbabwe dressing room.
Sri Lanka 346
(Tharanga 71, Chandimal 55, Cremer 5-125) and 391 for 6
(Dickwella 81, Gunaratne 80*, Cremer 4-150) beat Zimbabwe 356
(Ervine 160, Herath 5-116) and 377
(Raza 127, Waller 68, Herath 6-133) by four wickets