Sri Lankan bowler Muttiah Muralitharan has become the first man to take 800 Test wickets with the final delivery of his career.
The wicket of India's 11th man Pragyan Ojha for 13 on Thursday set Sri Lanka on course for a 10 wicket victory in the First Test and sparked wild celebrations in Galle.
Muralitharan's unique feat was greeted by fireworks and the entire Sri Lanka team hugged the off-spinner before carrying him shoulder high to the dressing room.
After the teams came back out, the hosts reached their target in just 14 overs with Tillakaratne Dilshan unbeaten on 68 and Tharanga Paranavitana on 23.
Muralitharan had needed eight wickets from the match to reach 800 in his career and had managed five in the first innings.
But as India doggedly fought their way to 338 runs, it seemed as though he might miss out on the milestone until Ojha was brilliantly caught at first slip by Mahela Jayawardene.
India resumed the final day on 181-5 after being forced to follow on, but was hopeful that its last recognised batting pair would rescue them from defeat.
However, seamer Lasith Malinga struck after just five runs had been added to the overnight total, bowling Indian captain Mahendra Singh Dhoni with a yorker.
Muralitharan then trapped Harbhajan Singh lbw to record his 799th wicket, but as Sri Lanka focused on Muralitharan's record, India's tailenders and V.V.S. Laxman ate up some valuable time and added crucial runs.
Laxman who looked solid against an aggressive bowling attack was eventually run out for 69 after lunch. He faced 127 balls and hit five boundaries.
Earlier, Sri Lanka's President Mahinda Rajapaksa flew in by helicopter to watch a few minutes play and spoke to Muralitharan, who is retiring.