Mahela Jayawardene insisted "the time was right to go" after bringing the curtain down on his Test career.
The Sri Lankan batsman bowed out of the longest format of the game on a winning note, helping his country complete a 2-0 sweep of Pakistan with a 105-run victory in the second match of the series in Colombo.
Jayawardene was hoisted onto his team-mates' shoulders and warmly congratulated by Sri Lanka's president after playing in his 149th and final Test, during which time he amassed 11,814 runs with 34 centuries.
"I took the decision to retire after a lot of serious thought," he said. "I was fortunate to have played for 17 years so it was not an easy decision to make.
"But I think the time was right to go. It was a gut feeling and I have always gone by my gut feelings in the past.
"We do not have many Tests for a year now. I have played enough and it is time for the younger players to take over./p>
"I have very pleasant memories of my career. I enjoyed this phase of my life, I learnt a lot and good things entered my life. I cherish every moment of it."
The 37-year-old is not quite yet finished with international cricket, though.
Jayawardene quit Twenty20 internationals after helping Sri Lanka become world champions in April, but he is still hoping to carry on in 50-over cricket through to the next year's World Cup.
"I am not sure I will be selected for the World Cup, but I will focus on one-day cricket," added the man who captained Sri Lanka to the 2007 final.
The right-hander made his Test debut against India back in 1997, scoring a half-century in his first innings. He also ended it with another 50, meaning he ended up with an overall average of 49.84.