|Marvan Atapattu has walked to the pavilion for the last time [GALLO/GETTY]|
Sri Lankan batsman Marvan Atapattu decided it was time to retire rather than leave his international future to a Sri Lanka selection panel he described as "Muppets led by a joker".
Atapattu kept his place for the second test here despite his outspoken outburst during Sri Lanka's innings and 40-run defeat to Australia in the first test last week.
He scored a defiant 80 to kickstart Sri Lanka's improbable chase for 507 runs needed to win the second test and announced his retirement from cricket on Tuesday, just before Sri Lanka went down by 96 runs.
"I write to inform you that I will be retiring from international cricket for Sri Lanka with effect from November 21," Atapattu said in a statement released at the match.
In it, he thanked his former coaches, fans and even administrators.
It was a conciliatory gesture following his comments about Sri Lanka's chairman of selectors, Ashanta de Mel, and the selection panel last week.
"Sri Lankan cricket, I think at this moment in time, is not going the way, the direction, it should be going," Atapattu said.
"Especially with the Muppets, basically, headed by a joker."
Atapattu was critical of selectors for not developing young talent and for relying on veterans to fill voids on difficult tours.
The bastman who turns 37 on Thursday had a difficult start to his test cricket career, scoring only one run in his first six innings starting in November 1990, but finished with 5,502 runs at 39.02 in 90 tests, including six double-centuries.
Sri Lanka skipper Mahela Jayawardene has been a clubmate or national teammate of Atapattu's for more than A decade and said it was an emotional time for his old friend.
"It was a bit of a surprise for us as well because he made a strong comeback after not playing for some time and was very determined to show what he was capable of," Jayawardene said.
"He proved that to a lot of people. The work ethic he had was incredible. It's sad, but ... it's a decision he made under his own terms. You've got to respect that."
Sri Lanka plays England in three test matches starting next month and will have to find a top-order batsman to fill the breach.
"He felt it was the right time to leave Sri Lanka cricket and give others the opportunity," Jayawardene said.
"He made that decision himself, that was great."
Atapattu, who scored 51, 16, 25 and 80 in the two-test series against Australia, is considering a career in broadcast commentary and playing grade cricket in Australia.