South Africa captain Graeme Smith described it as the toughest decision of his life to bring the curtain down on his international career after almost 350 appearances for his country.

Smith made the shock announcement on Monday night that he would be retiring from the international arena at the conclusion of the ongoing third Test against Australia.

The 33-year-old told team-mates following the third day's play in Cape Town and tributes soon started pouring in for the left-hander, who has been described as "a legend", "a warrior" and "all round good egg" by some of those in the game.

The announcement may have taken many by surprise, but Smith said he had been mulling it over for almost a year.

He also said it was far from easy opting to call time on an international career that has spanned 347 matches in the three formats since he made his debut in 2002, during which time he has scored 37 centuries - 27 in Tests and 10 in one-day-internationals.

He said: "This has been the most difficult decision I have ever had to make in my life.

"It's a decision that I have been considering since my ankle surgery in April last year.

"I have a young family to consider, and I felt that retiring at Newlands would be the best way to end it because I have called this place home since I was 18 years old."

Smith will leave South Africa with a major hole to fill having been a key fixture in their line-up for well over a decade.

This, his last Test, is his 117th, of which he has been captain for 110 - a world record.

He came into the match having scored 9,257 Test runs at an average of 48.72, while he has also played 197 ODIs, averaging almost 38, and 33 T20 Internationals.

Smith, who has also taken 26 wickets for South Africa with his off-breaks, continued: "I have always been someone who has left everything out there on the field for my team and for my country.

"I'm extremely honoured and proud to have had the privilege to lead so many wonderful players and to have been a part of building the Proteas culture to what it is today. It is a culture that every player can be, and is, immensely proud of.''

Whether Smith leaves international cricket on the back of a series defeat remains to be seen.

At the close of day three in the deciding third Test against Australia, South Africa were facing an uphill battle as Australia closed with a lead of 234 and 10 second-innings wickets still intact - Smith having been dismissed for five in his side's 287 all out.

A series loss would be a rare setback for Smith's South Africa in recent years, with the team at the top of the ICC Test rankings.

However, while defeat would leave a sour taste in the mouth for the departing Smith, his standing in the game is already assured.

Former England batsman Kevin Pietersen was one of those to hail Smith, saying on Twitter: "Hearing huge news out of SA. @GraemeSmith49 is retiring! For what he has done for SA cricket - the man is a legend! Congrats my Surrey BFF!"

The two batting superstars are set to line up together for Surrey in county cricket this summer, with Smith having signed a three-year deal at the Kia Oval in November 2012 as well as being installed as captain.

Surrey, who were relegated to Division Two last season, confirmed on Monday night that Smith's international retirement will have no bearing on his contract with the county and is due to arrive in London next month.

Alec Stewart, director of cricket at Surrey and former England captain, said: "Graeme has been an outstanding leader and player for South Africa and has been instrumental in making them the number one side in the world.

"From when I first played against him in 2003 he has impressed me immensely in everything he has done on a cricket field. South Africa will obviously miss him but we look forward to welcoming him back to the Kia Oval this season."

Another former England captain, Michael Vaughan, also heaped praised on Smith, tweeting: "Huge respect to @GraemeSmith49 .Fantastic Captain,Leader,Batsmen,Bloke and all round good egg... #Legend.

"Had some great battles and many on field arguments with @GraemeSmith49 but we always ended up having a beer at the end of games."

Cricket South Africa chief executive Haroon Lorgat admitted Smith's announcement had come out of the blue, but hailed the Johannesburg-born batsman as "a mighty warrior, a leader of men and an exceptional part of our international cricket".