By . Phil Gradwell for MailOnline . Follow @@GraddersOnline . Sri Lanka captain Mahela Jayawardene was carried off the pitch in Colombo on the shoulders of his team-mates as his final Test ended in victory over Pakistan. Rangana Herath took five for 57 in the second innings - and 14 wickets in the match - to propel Sri Lanka to a 105-run victory on the final morning at the Sinhalese Sports Club and send Jayawardene into Test retirement with a win. The 37-year-old ended his 149-match, 17-year Test career with 11,814 runs at an average of nearly 50, and 34 centuries. Waving goodbye: Mahela Jayawardene is carried off by his team-mates as he retires from Test cricket . Head and shoulders above: Jayawardene scored 34 Test centuries for Sri Lanka and averaged almost 50 . All smiles: Jayawardene is chaired off and holds a stump after Sri Lanka's win over Pakistan . The 54 he scored in his last innings was his 50th half century in the ultimate form of the game and he also took three slip catches. 'The decision to retire was something I have been thinking for some time and came to a point I felt that for me the right time was right,' said Jayawardene, who will play at next year's 50-over World Cup . 'It was just a gut feeling, but have I always gone with my gut feelings. 'Given the fact that we don't have Test cricket for another 12 months it's time for a new generation to take over. I will try to help that rebuilding process.' Jayawardene revealed he will also try to make room in his trophy cabinet for his Test cap which he has worn for 15 of his 17 years. Hat-trick: Jayawardene plans to put his cap, which he's worn for 15 years, in his trophy cabinet . Test debut: vs India (Colombo, 1997) Tests: 149. Runs: 11,814. Fifties: 50. Centuries: 34. 200s: 6 300s: 1 . Highest score: 374 vs South Africa in 2006 . 'It has a huge value, I have stitched it and managed to wear it for such a long time. 'It's been with me for 15 years now, the first two years we had a different cap. I think this will go in my trophy cabinet at the top.' His Sri Lanka team-mate Kumar Sangakkara tweeted: 'A legend retires. Glad we were able to give mayya a winning farewell. Amazing career amazing guy. And to rangana you're the magic man.' Pakistan started the last day on 127 for seven, facing almost inevitable defeat with only the possibility of rain giving them some hope of saving the Test. Sarfraz Ahmed followed up his century in the first innings with 55 in the second before he was caught by Kumar Sangakkara in the deep off seam bowler Chanaka Welegedara. Riaz's dismissal sealed victory for Sri Lanka, with Junaid Khan unable to bat after being hit on the head by a Dhammika Prasad bouncer in the first innings. It gave long-serving Jayawardene a fitting farewell to the five-day format and sealed a 2-0 series win. Turning the screw: Rangana Herath jumps on captain Angelo Mathews as he celebrates one of his 14 wickets .
Jayawardene carried off in Colombo on team-mates' shoulders .
The 37-year-old played Tests for 17 years, scoring 11,814 runs .
He will put his cap, which he wore for 15 years, in his trophy cabinet .
Rangana Herath took 14 wickets in match to destroy Pakistan .
By . Phil Gradwell for MailOnline . Follow @@GraddersOnline . Sri Lanka captain Mahela Jayawardene was carried off the pitch in Colombo on the shoulders of his team-mates as his final Test ended in victory over Pakistan. Rangana Herath took five for 57 in the second innings - and 14 wickets in the match - to propel Sri Lanka to a 105-run victory on the final morning at the Sinhalese Sports Club and send Jayawardene into Test retirement with a win. The 37-year-old ended his 149-match, 17-year Test career with 11,814 runs at an average of nearly 50, and 34 centuries. Waving goodbye: Mahela Jayawardene is carried off by his team-mates as he retires from Test cricket . Head and shoulders above: Jayawardene scored 34 Test centuries for Sri Lanka and averaged almost 50 . All smiles: Jayawardene is chaired off and holds a stump after Sri Lanka's win over Pakistan . The 54 he scored in his last innings was his 50th half century in the ultimate form of the game and he also took three slip catches. 'The decision to retire was something I have been thinking for some time and came to a point I felt that for me the right time was right,' said Jayawardene, who will play at next year's 50-over World Cup . 'It was just a gut feeling, but have I always gone with my gut feelings. 'Given the fact that we don't have Test cricket for another 12 months it's time for a new generation to take over. I will try to help that rebuilding process.' Jayawardene revealed he will also try to make room in his trophy cabinet for his Test cap which he has worn for 15 of his 17 years. Hat-trick: Jayawardene plans to put his cap, which he's worn for 15 years, in his trophy cabinet . Test debut: vs India (Colombo, 1997) Tests: 149. Runs: 11,814. Fifties: 50. Centuries: 34. 200s: 6 300s: 1 . Highest score: 374 vs South Africa in 2006 . 'It has a huge value, I have stitched it and managed to wear it for such a long time. 'It's been with me for 15 years now, the first two years we had a different cap. I think this will go in my trophy cabinet at the top.' His Sri Lanka team-mate Kumar Sangakkara tweeted: 'A legend retires. Glad we were able to give mayya a winning farewell. Amazing career amazing guy. And to rangana you're the magic man.' Pakistan started the last day on 127 for seven, facing almost inevitable defeat with only the possibility of rain giving them some hope of saving the Test. Sarfraz Ahmed followed up his century in the first innings with 55 in the second before he was caught by Kumar Sangakkara in the deep off seam bowler Chanaka Welegedara. Riaz's dismissal sealed victory for Sri Lanka, with Junaid Khan unable to bat after being hit on the head by a Dhammika Prasad bouncer in the first innings. It gave long-serving Jayawardene a fitting farewell to the five-day format and sealed a 2-0 series win. Turning the screw: Rangana Herath jumps on captain Angelo Mathews as he celebrates one of his 14 wickets .
Jayawardene was carried off the pitch in Colombo on the shoulders of his team-mates as his final and 14 wickets in the match - to propel Sri Lanka he has worn for 15 of his 17 years. Hat-trick: Jayawardene plans to put his cap, which he's worn for 15 years, in his trophy cabinet . Test debut: Rangana Herath jumps on captain Angelo Mathews as