South Africa's finance minister Nhlanhla Nene has quit after admitting meeting members of the Gupta family, who have been accused of corruption.
President Cyril Ramaphosa said he accepted the resignation "in the interests of good governance".
The Guptas have been accused of working with former President Jacob Zuma to secure government contracts and determine cabinet appointments.
Both the Guptas and Mr Zuma deny the allegations.
Mr Nene has been replaced by former central bank chief Tito Mboweni. This is the fifth change of finance minister since 2014.
Last week, Mr Nene told a judge-led inquiry into the alleged influence of the Guptas, known as the Zondo commission, about meetings that he had previously denied.
There is no suggestion that he had done anything illegal in meeting the businessmen during his stint as deputy finance minister and finance minister in Mr Zuma's government, but he has been under intense political pressure to step down since making the admission.
Ghana News Headlines
For latest news in Ghana, visit Graphic Online news headlines page Ghana news page
Mr Zuma sacked him as finance minister in 2015, but he was reappointed by the current president in February.
Rumours of his intended resignation on Monday led to a fall in the value of South Africa's currency, the rand, but it has since recovered its value.
What was so controversial about the meetings?
Mr Nene met the Guptas at their businesses and home at least six times between 2009 and 2014.
On the face of it a finance minister talking to top business people may seem normal, but the Guptas have been accused of using meetings, in their residence in a posh suburb of Johannesburg, to influence political decisions.
Former Deputy Finance Minister Mcebisi Jonas has told the Zondo commission that in 2015 he had been offered 600m rand ($41m; £32m) if he accepted the post of finance minister at a meeting at the Johannesburg mansion. The Guptas denied the allegation.
After revealing the details of his own meetings, Mr Nene issued a public apology saying: "I am human too, I do make mistakes, including those of poor judgement."
Is this a blow to Mr Ramaphosa?
Mr Ramaphosa, who became president in February, brought Mr Nene back into the cabinet in order to restore confidence in the reputation of the country's economic management.
It had received a battering under Mr Zuma's presidency.
In his speech accepting the resignation, Mr Ramaphosa said that Mr Nene had "defended the cause of proper financial management and clean governance".
But he had accepted the resignation because Mr Nene feared his testimony "detracted from the important task of serving the people of South Africa as we work to re-establish public trust in government", Mr Ramaphosa said.
'New way of doing things'
Milton Nkosi, BBC News, Johannesburg
Mr Nene's resignation signals a new way of doing things in South African politics.
He fell on his sword for admitting that he had misled people, but his act is remarkable in itself as there was no evidence of any wrong doing during his meetings with the Guptas.
The culture of resigning is almost non-existent in South Africa, particularly amongst senior political figures.
People wait until they are pushed. Mr Nene jumped.
There are many within the current administration who have done far worse and yet cling onto their cushy jobs.
The appointment of Mr Mboweni, 59, has been widely welcomed.
He became South Africa's first black central bank governor in 1999 and was in the post for a decade.
He was seen as having done a good job, and is considered an old and trusted hand.
Who are the Guptas?
The Gupta family relocated to South Africa from India in 1993 and began to build up a business empire with interests in mining, air travel, energy, technology and media.
Using its wealth, the family was accused of wielding enormous political and economic influence under the presidency of Mr Zuma in what is known in South Africa as "state capture".
Both Mr Zuma and the Gupta family have denied wrongdoing but the corruption allegations added to a sense of South Africa's decline under his presidency.
He resigned as president in February and people hoped Mr Ramaphosa could repair the damage.
According to South African media, some of the Guptas now live in Dubai.
Mr Ramaphosa's government signed an extradition treaty with the United Arab Emirates in September.
This fuelled speculation that South Africa may try to have them extradited once investigations into alleged corruption are concluded.
Credit: The BBC https://www.bbc.com/news/world-africa-45796747