Muttiah Muralitharan became the first bowler to take 800 Test wickets on the final day of his Test career in Galle.
The Sri Lanka off-spinner, 38, who made his Test debut in 1992, began his final match against India on 792 wickets.
He ousted record Test run-scorer Sachin Tendulkar on Tuesday and went on to take 5-63 as India had to follow on.
Team-mate Lasith Malinga took 5-48 but with the last pair together, Murali had last man Pragyan Ojha caught by Mahela Jayawardene at slip to reach his 800.
TOP TEST WICKET-TAKERS
800* Muttiah Muralitharan (SL)
708 Shane Warne (Aus)
619 Anil Kumble (Ind)
563 Glenn McGrath (Aus)
519 Courtney Walsh (WI)
434 Kapil Dev (India)
431 Sir Richard Hadlee (NZ)
421 Shaun Pollock (SA)
414 Wasim Akram (Pakistan)
405 Curtly Ambrose (WI)
*includes 5 for ICC XI
It left Sri Lanka needing to score 95 to win the game and take a 1-0 lead in the series, but Muralitharan’s achievement – reached in his 133rd Test – will overshadow the game.
Earlier in July, the BBC Sinhala Service revealed Muralitharan’s retirement plans – and he later confirmed that this Test in Galle, the first of a three-game series, would be his last.
He is expected to continue to play limited-overs internationals until next spring’s World Cup, which will be staged in Sri Lanka, India and Bangladesh.
Born in Kandy, Muralitharan has also taken 515 wickets in 337 one-day internationals, and a further 13 in Twenty20 internationals.