"This is my time to call it a day," Sangakkara, 37, told reporters on the sidelines of the second Test against Pakistan at the P. Sara Oval in Colombo.
The left-hander said he will play two of the three Tests against India that will take place in Sri Lanka in August. The exact dates and venues have not yet been announced.
Sangakkara, the current world leading Test run-getter, said he will also skip the third and final Test of the ongoing series against Pakistan starting in Pallekele on July 3.
"I wanted to retire after the World Cup, but was requested by the selectors to stay on," he said. "I agreed to play four more Tests. I will honour that agreement. I gave my word, so will stand by that."
Sangakkara's 12,305 runs and 38 centuries are the most by any batsman still playing Tests, way above second-placed Alastair Cook of England, who has 9,000 runs and 27 hundreds.
The 132-Test veteran may be below record-holder Sachin Tendulkar's Test tally of 15,921 runs and 51 hundreds, but his 11 scores of 200-plus are just one short of Australian legend Don Bradman's record of 12.
"I don't want to prolong my career for records," said Sangakkara. "I don't want to extend my career for individual records. This is the time to go."
In the first Test against Pakistan in Galle, Sangakkara hit a 50 in the first innings -- his 52nd half-century -- and 18 in the second when Sri Lanka were shot out for 206 to lose by 10 wickets.
He fell for 34 in the first innings of the ongoing second Test.
Sangakkara had hammered 203 against New Zealand in Wellington in January to continue a prolific streak that saw him make 221 against Pakistan and 319 against Bangladesh last year.
Sangakkara retired from Twenty20 cricket after helping Sri Lanka win the World Twenty20 title in Bangladesh last year and quit one-day internationals after the recent World Cup Down Under where he smashed four consecutive centuries.
"I am going to miss playing for Sri Lanka a lot," he said. "I had the time of my life playing for Sri Lanka. I enjoyed playing every format but donning whites for Sri Lanka has been special.
"I can walk away happy that good days outweigh the disappointments."
Asked when he first thought of retiring, Sangakkara said, "My father asked me a couple of years ago 'don't you think it's time to think of retirement?' I was shocked.
"But it struck home that it was time to think of the future."
Sangakkara added his two-year contract with English county Surrey did not hasten his decision to retire from Tests, as he dismissed the idea of becoming a coach after retirement with a laugh saying he would "make a bad coach".
"I don't know if I will have the patience for that," he added.
He predicted a bright future for the young Sri Lankan team under Angelo Mathews and urged fans to have patience with them.
"There is a lot of talent and ability in the dressing room," Sangakkara said. "Angelo is a fantastic cricketer and captain. He is the ideal man to lead Sri Lanka.
"I wish there will be real culture of fearless cricket. Give this team a period of a year and they will come a long way."
COMMENTS
Comments are moderated and generally will be posted if they are on-topic and not abusive.
For more information, please see our Comments FAQ