JOHANNESBURG, South Africa (CNN) -- South African President Thabo Mbeki announced his formal resignation Sunday during a televised address but did not say when he would leave office.
South African President Thabo Mbeki attends a special Cabinet meeting in Pretoria on Sunday.
1 of 2 Mbeki said the African National Congress will determine when his resignation takes effect.
His resignation will clear the way for his longtime political rival, Jacob Zuma, to run for the office in spring.
"I would like certainly to thank the nation and the ANC for this opportunity to serve first as deputy president and then president," Mbeki said.
Before the televised address, he met with his Cabinet on Sunday to discuss his decision.
Some ministers said during the meeting that they would quit if Mbeki resigned, a source with knowledge of the meeting told CNN. Mbeki urged the Cabinet members to stay in government after he resigns, the source said.
Mbeki, who has been president for nearly 10 years, spoke of some of his achievements during his televised address.
"I depart this office knowing that many men and women in South Africa have worked to achieve better lives for all," he said. Watch the significance of Mbeki "falling on the sword" »
Judge throws out Zuma corruption charges
South African President Mbeki to quit
Blog: Zuma case a watershed moment
Under his leadership, South Africa has had the longest period of sustained economic growth in its history and has reached out to indigent people in an unprecedented way, Mbeki said.
He said the country still faces economic, corruption and crime challenges. And he gave his vote of confidence to the next leader's administration without naming who that leader would be.
Gwede Mantashe, secretary-general of the African National Congress, announced Saturday that the party -- with which Mbeki has been involved since his teens -- had asked him to leave before his term was up.
Mbeki agreed to do so, he said.
Mantashe said the ANC made the decision "for the citizens of South Africa, so there could be stability within the country" and so the ANC movement could remain "stable and unified."
The party's request to Mbeki came after a judge threw out the corruption, fraud and racketeering case against Zuma on September 12, calling them invalid and accusing Mbeki's government of political interference in the case.
The case against Zuma -- who replaced Mbeki as ANC president last year -- was thrown out in September 2006, but the National Prosecuting Authority recharged him. Judge Chris Nicholson made no ruling on Zuma's guilt or innocence, and he could be recharged.
Political observers doubted that would happen because of Zuma's popularity, including with the Communist Party and trade unions.
Zuma has denied the charges. He said the case was politically motivated, and harmed his chances to become the ANC's presidential nominee.
Zuma had been facing at least 15 years in jail if convicted of accepting bribes from a company that got a contract in a multibillion-dollar arms deal.
He also faced charges of having a corrupt relationship with his former financial adviser, Schabir Shaik, who is serving a 15-year sentence for soliciting bribes for Zuma and using Zuma's political influence to benefit his businesses.
Mbeki, 66, succeeded Nelson Mandela as South Africa's president in June 1999. Critics of Mbeki alleged he pushed for the corruption charges against Zuma.
Mbeki recently brokered a power-sharing deal between Zimbabwe's political rivals, who signed the agreement on Monday in an effort to put aside the violent past and end the crisis that has paralyzed Zimbabwe since disputed national elections in March.
Under it, longtime Zimbabwean leader Robert Mugabe remains president, while his rival, Morgan Tsvangirai, has become prime minister and the coordinator of government affairs.