South Africa batsman AB de Villiers has retired from international cricket with immediate effect.

Former captain De Villiers has played 114 Tests, 228 one-day internationals and 78 Twenty20s for the Proteas, but on Wednesday said he is "tired" and "running out of gas".

The 34-year-old revealed he hopes to continue playing for the Titans and has no plans to play overseas soon after Morne Morkel signed a Kolpak deal with Surrey.

De Villiers, arguably the most innovative batsman who has ever played the game, was absent from Test cricket for almost two years but was outstanding after making his comeback in the longest format late in 2017.

The destructive right-hander has tormented bowlers in all formats, scoring 47 centuries for his country, but says the time has come to quit.

He stated in a video posted on his Twitter account: "It is time for others to take over, I've had my turn and to be honest, I'm tired. This is a tough decision, I've thought long and hard about it and I'd like to retire while still playing decent cricket.

"After the fantastic series wins over India and Australia, now feels like the right time to step aside. It would not be right for me to pick and choose where, when and in what format I play for the Proteas. 

"For me in green and gold it must be everything or nothing. I will always be a grateful for my team-mates, coaches and the staff of Cricket South Africa for their support through all these years.

"It's not about earning more somewhere else, it's about running out of gas and it is time to move on. Everything comes to an end. 

"To cricket fans in South Africa and around the world, thank you very much for your kindness and your generosity and today, for your understanding. I have no plans to play overseas, in fact, I hope I can continue to be available for the Titans in domestic cricket and I will remain the biggest supporters of Faf du Plessis and the Proteas."

Most recently, De Villiers has showed his class with the bat for Royal Challengers Bangalore in the 2018 Indian Premier League, but they failed to qualify for the play-offs.