South Africa's president Jacob Zuma has announced on national television he would resign with immediate effect.

The embattled leader had been given a deadline of 14 February his ruling ANC party or face a vote of no confidence in the parliament.

He has faced down claims of corruption and a number of other controversies since he took the reins in 2009.

In a long speech on Wednesday, he said he was not happy with how his party had treated him, but added: "I have served the people of South Africa to the best of my ability."

"No life should be lost in my name and also the ANC should never be divided in my name.

"I have therefore come to the decision to resign as president of the republic with immediate effect," he said, according to the Associated Press.

"Even though I disagree with the decision of the leadership of my organisation, I have always been a disciplined member of the ANC. As I leave I will continue to serve the people of South Africa as well as the ANC, the organisation I have served... all of my life."

The ANC said in a statement that the resignation would mean there would be "certainty to the people of South Africa".

Cyril Ramaphosa, who is now the country's acting president, is expected to be elected swiftly in a parliament vote and sworn in.

Jacob Zuma
11 March 2015: South African president Jacob Zuma answers question at the parliament in Cape Town, as he was facing widespread criticism over alleged corruption surrounding his private estate, a national electricity crisis, rising unemployment and an ailing economy Nic Bothma