Phumzile Mlambo-Ngcuka is a staunch supporter of Thabo Mbeki
South Africa's governing African National Congress (ANC) has confirmed that deputy leader Kgalema Motlanthe, will become the caretaker president.
Mr Motlanthe, an ally of party leader Jacob Zuma, will succeed Thabo Mbeki, who is due to step down on Thursday on the orders of the ANC.
The confirmation came as deputy leader Phumzile Mlambo-Ngcuka resigned.
Meanwhile, Mr Mbeki is appealing against a judge's ruling that he meddled in Mr Zuma's corruption case.
Judge Chris Nicholson dismissed the case on a technicality earlier this month, but said Mr Mbeki may have interfered in the case.
This led to the ANC recalling Mr Mbeki as president - a decision he has accepted, even though he denies the charge.
In his challenge to the Constitutional Court, Mr Mbeki said the ruling was "unfair and unjust", as he had not been able to defend himself in court.
He said the "vexatious, scandalous and prejudicial" judgement had already cost him his job and damaged his reputation.
"Unless the errors in the judgment are rectified immediately by means of a judgment, I will continue to suffer and may even suffer great harm," he said.
1967: Detained for 11 months
1977: Sentenced to 10 years on Robben Island
1987: Joined National Union of Mineworkers, rising to become its secretary general
1997: Elected ANC secretary general
2007: Elected ANC's deputy president
2008: Becomes an MP and minister without portfolio
The BBC's Peter Biles in Johannesburg says Deputy President Mlambo-Ngcuka's resignation clears the way for the appointment of Mr Motlanthe as caretaker president.
Our reporter says Mrs Mlambo-Ngcuka, who became deputy president in 2005 after Mr Zuma was sacked, has been a staunch supporter of President Mbeki.
It had been thought that she might take over the running of the country, following Mr Mbeki's resignation, but now she has made it clear that she is also resigning.
The ANC has been urging cabinet ministers to remain in their posts in the wake of the political shake-up.
Our reporter says it is possible that some will still choose to leave the government but ANC spokesperson Jessie Duarte says the party has not officially been told about any more resignations.
She also confirmed to South Africa's Talk Radio 702 that Mr Motlanthe, due to be sworn in on Thursday, will lead the country until the next election.
Mr Zuma is expected to be elected president in polls due early next year.