South African President Jacob Zuma has announced his resignation with 'immediate effect'.
It came as the country's governing African National Congress (ANC) prepared to table a motion of no-confidence in Mr Zuma tomorrow.
The ruling party had already asked Mr Zuma to resign.
The party was aiming to remove the president from power so deputy president Cyril Ramaphosa could take over.
Addressing the nation this evening, he said: "All my life I have served, and I will continue to serve the ANC in its pursuit of the national democratic revolution."
He added: "I fear no motion of no confidence or impeachment, for they are the lawful mechanisms for the people of this beautiful country to remove their president.
"I've served the people of South Africa to the best of my ability. I am forever grateful that they trusted me with their highest office in the land. But when I accepted the deployment I understood and undertook to subject myself to the supreme law of the land - the constitution."
After a lengthy speech, he confirmed: "I have come to the decision to resign as president of the republic with immediate effect.
"Even though I disagree with the decision of the leadership of my organisation, I have always been a disciplined member of the ANC."
The recent moves against the president by his own party came after police raided the home of a business family linked to President Zuma, describing it as a "crime scene."
The powerful and wealthy Gupta family are suspected of using their ties to the president to influence cabinet positions and land state contracts.
The embattled president has faced a number of corruption scandals and was replaced as ANC leader in December.
Reporting by Mick Staines and Stephen McNeice