Kumar Sangakkara will retire from Test cricket following the second Test of the series against India in August.

Sangakkara, who has already retired from one-day and Twenty20 internationals, is Sri Lanka's highest run-scorer and the fifth-highest Test scorer of all time.

Cricket Sri Lanka released the news following the end of play on the third day of the second Test against Pakistan.

"@KumarSanga2 announced that he will retire from all forms of international cricket after the 2nd test of the upcoming India Series," read a Tweet from the governing body.

The 37-year-old bowed out of Twenty20 internationals with an unbeaten 52 as he helped guide Sri Lanka to victory in the final of the T20 World Cup last year and played his last ODI in the quarter-final defeat to South Africa at the World Cup in March.

Since making his Test debut against South Africa in 2000, Sangakkara has completed 131 matches, scoring 12,271 runs with 38 centuries at an average of 58.43.

He is currently playing in his 132nd contest against Pakistan in Colombo where he scored 34 in the first innings.

The wicketkeeper-batsman, who no longer operates behind the stumps in five-day cricket, took 179 Test catches with 20 stumpings.

Sangakkara also captained his country between 2009 and 2011, losing just three of his 15 Tests in charge.

Speculation about his retirement had been circulating for some time but he is expected to continue in domestic cricket where he currently plays for Surrey in the County Championship and Hobart Hurricanes in the Big Bash.

Sangakkara is also the second-highest ODI run-scorer of all-time with 14,234 runs from 404 matches while he scored 4,049 runs in 159 Twenty20 internationals.