Mahela Jayawardene will retire from Test cricket at the conclusion of the series against Pakistan in August, Sri Lanka Cricket has announced. He will continue to be available for ODI cricket only, having also retired from T20 internationals in April this year.

Jayawardene, 37, has been a cornerstone of the Sri Lanka batting order since his debut against India in 1997, and has amassed 11493 Test runs in his career, which is currently joint-highest for a Sri Lanka batsman alongside Kumar Sangakkara. He has played 145 Tests, and if fit and selected, will finish on 149, at the P Sara Oval match which begins on August 14. Jayawardene has hit 33 hundreds and 48 fifties in 244 innings.

"It was not an easy decision to make given that it has been a great privilege and honour representing my country during the past 18 years," Jayawardene said. "But I believe this is the right time."

Jayawardene has been in good Test-match form in 2014, averaging 75.77 in his six most recent matches. But with no home Tests scheduled for almost a year, and only two Tests in New Zealand remaining before the 2015 World Cup, he had alerted chief selector Sanath Jayasuriya of his wish to walk away from the longest format.

"He called me and said that he wants to play four more matches and retire from Test cricket, concentrating on ODI cricket until the World Cup," Jayasuriya said. "I think he is the best person to judge that. He has given outstanding service to Sri Lankan cricket, and is now giving a youngster a chance to come in and play Test cricket."

Jayawardene also led the Sri Lanka team from 2006 to 2009, and again for 12 months from early 2012 to 2013. His first captaincy stint was among Sri Lanka's most successful stretches of Test cricket, as the team won 15 of 28 matches and lost only seven. Renowned for his aggressive, innovative strategy, Jayawardene is regarded as one of Sri Lanka's best leaders, and perhaps the team's best tactician. He has played in 56 Test victories in all.

Among the most remarkable statistics of his career is his home average of 61.12, and his exploits in Sri Lanka have been key to his team's success at home since the turn of the century. Many of his best innings have come on bone-dry surfaces, where other batsmen have been unsuccessful. An excellent technique against spin bowling and a sharp cricket mind have been major themes in his cricket, and have seen him play match-defining innings, particularly in low-scoring games.

Jayawardene has hundreds against every Test side, and in every Test-playing country apart from South Africa, where he has struggled most. His away average of 41.50, and his modest returns on faster, bouncier surfaces have been the major criticisms leveled at his cricket. He has, however, had some success in England, where he has two hundreds at Lord's. Jayawardene hit 174 runs at 43.50 in his most recent series in England.

He has also excelled as a slip fielder throughout his career, sitting third on the all-time catches list, with 197 takes. He has been particularly sharp while fielding to spin bowling, with the Muttiah Muralitharan-Jayawardene partnership the most prolific bowler-fielder combination in Test history. He has completed catches more regularly than the other four fielders in the Test top five, with an average 0.75 catches per innings.

Apart from holding the Sri Lankan record for most runs, most catches and most Tests, Jayawardene has also made the highest score by a Sri Lankan - his 374 against South Africa in 2006. A still presence at the crease, and blessed with strong, supple wrists, Jayawardene is also known as one of the game's foremost stylists, with strokes all around the wicket, both classical and modern.

He had also been perhaps the most popular schoolboy cricketer of the 90s, for Nalanda College. He leaves the game in 2014 as a Sri Lankan great.