Former Australia captain Ricky Ponting has announced he will retire from international cricket at the end of the third Test against South Africa.
The 37-year-old, who is the second highest run scorer in Test history behind Sachin Tendulkar, will play his 168th Test in Perth on Friday.
"I haven't been performing consistently over the last 12 to 18 months," he said. "I believe now is the right time.
"This is a decision not made by the selectors, it was made by me."
Ponting has scored 13,366 runs at an average of 52.21 in his career, but he has struggled for form in the current series with South Africa.
He scored just 20 runs in the two drawn Test matches and, despite receiving the support of coach Mickey Arthur, he decided to make way.
The Tasmanian admitted his recent poor form had prompted the decision to call time on an international career that began in 1995.
"It's a decision I thought long and hard about. It was based on my output and my results in this series so far. It hasn't been what I expect of myself and certainly not the level required of a batsman in the Australia team," he said.
"I've said all along that I would continue to play as long as I could continue to make a contribution to wins, and I think over the last couple of weeks my performance has not been good enough to do that.
"I've given cricket my all, it's been my life for 20 years, there's not much more I can give."
Ponting made the announcement at a news conference at the Waca in Perth, flanked by his wife Rianna, daughters Emmy and Mattise and every member of the Australia team.
The series is level at 0-0 going into the third and final Test, and Ponting is determined to end his international career with a 109th Test victory to return Australia to the top of the Test rankings.
"If that happened and we get back to the top of the tree and number one in the world then there's no better time to finish," he said.
Australia captain Michael Clarke was close to tears as he paid tribute to his predecessor, who stepped down from the Test captaincy last year and retired from one-day cricket in February.
"The boys are obviously hurting at the moment. He's been an amazing player for a long time," Clarke said.
Former England captain and BBC Sport columnist, Alec Stewart, said Ponting's tough and uncompromising style epitomised Australian cricket over the past 17 years.
"After Sir Donald Bradman he has got to go down as the next best Australian batsman there has ever been."
Prime Minister Julia Gillard thanked Ponting in the Parliament of Australia for his contribution to international cricket and wished him well in his retirement.
"It means that he is going into the next phase of his life with a lot of gratitude and a lots of thanks from the Australian community - full as it is with cricket tragics," she said at question time on Thursday.
Former Australia opener Justin Langer believes Ponting, who will equal Steve Waugh's Australian record of 168 Tests at the Waca on Friday, will be remembered as one of the greats of the game.
"His humility, loyalty, passion for the game and for people is quite extraordinary," he said.
"It used to make me sick when the great Ricky Ponting walked out onto the ground and England fans booed him. I never quite got that.
"It was disrespectful and hard to stomach, but I am sure that he will be admired in England now that he has retired."
Ponting took over the one-day captaincy in 2002 and replaced Steve Waugh as Test captain in 2004. He went on to become Australia's most successful skipper with 48 Test wins.
Two more Ashes defeats followed in 2009 and 2010-11, and Ponting gave up the Australian captaincy after a World Cup quarter-final defeat to India in March 2011.
In the one-day game, Ponting guided Australia to back-to-back World Cup titles in 2003 and 2007, having won the trophy as a player in 1999.
Ponting plans to continue playing for Tasmania in the Sheffield Shield competition and the Hobart Hurricanes in the Big Bash League, and will play for the Prime Minister's XI against Sri Lanka later in the summer.