Thabo Mbeki, who took up an almost impossible challenge in 1999 to fill the shoes of the charismatic Nelson Mandela after he stepped down as South Africa's president, has confirmed he will quit the post following an order from the ANC.
Thabo Mbeki was born into one of the leading families of the ANC
His recent troubles stem from a bitter fallout with another charismatic politician - his former political ally Jacob Zuma, who is favourite to succeed him as president.
Mr Zuma was fired as deputy president three years ago after his financial adviser was found guilty of soliciting a bribe on his behalf, but he has gone on to become leader of the ruling African National Congress (ANC) and enjoys huge support in the party.
Mr Mbeki's political isolation became more pronounced after a high court judge ruled this month that corruption charges against Mr Zuma were politically motivated.
His predicament is all the more surprising given his reputation as a ruthless political operator - a popular characterisation he has done little to dispel throughout his presidency.
By most accounts, as deputy president, Mr Mbeki was effectively in charge of the country, as Mr Mandela applied himself to matters of diplomacy and post-apartheid reconciliation, and left the less glamorous business work to his number two.
Mark Gevisser, author of a recent biography of Mr Mbeki, set out the challenge that the new president faced.
"What Mbeki did was that he tried to find a way of establishing loyalty to him in a post-Mandela environment, where there was a natural and obvious loyalty to a patriarch," Mr Gevisser told the BBC.
"And the way he did it, was by saying: 'If they don't love me the way love Mandela, at the very least they need to respect me and perhaps even fear me'".
"He worked hard to make sure that people who might be his opponents were isolated - and those people did eventually leave the executive or the party".
An earlier biography by William Mervyn Gumede, with a political rather than a personal focus, charts how Mr Mbeki manoeuvred from being an outside candidate to succeed Mr Mandela, to becoming the sure successor by 1999.
But with less than a year to go till his second and final presidential term ends, Mr Mbeki is no longer able to arrange things to his liking.
Mr Mbeki and Mr Zuma in happier times
Given his troubles at home, it has been suggested he was determined to get Zimbabwe's political rivals to sign a power-sharing deal this month as part of his legacy.
He trumpeted the agreement as a success of his policy of quiet diplomacy - a policy for which he has been lambasted in the foreign and domestic media.
Mr Mbeki seems concerned with defending Africa against Western interests: Zimbabwe's President Robert Mugabe puts himself forward as one of the grand old men of African liberation and casts his opponents as the tools of British imperialism.
This world view reflects a personal history inseparable from the history of South Africa's struggle against white domination.
Domestically, his government's handling of the HIV/Aids crisis has also weakened his hand.
For years, as Aids deaths mounted in South Africa, Mr Mbeki questioned scientific orthodoxy about the links between HIV and Aids.
He personally endorsed the work of dissident researchers, while his government rejected the use of anti-retroviral (ARV) drugs on the grounds that they were toxic.
A theme of African self-reliance runs through Mr Mbeki's statements on Aids - that anti-Aids campaigns were a foreign vehicle to control African sexuality, and that ARV drugs were of use mostly to increase the profits of Western pharmaceutical companies.
Thabo Mbeki negotiated the recent Zimbabwe power-sharing deal
Following considerable pressure from activists, ARV drugs have been distributed in government clinics since 2004.
But Mr Gevisser is convinced that Mr Mbeki's attitude towards Aids remains unchanged, after the president sent a messenger to the author's home in 2007 with a paper setting out Mr Mbeki's current views.
"There is no question as to the message Thabo Mbeki was delivering to me along with this document: he was now, as he had been since 1999, an Aids dissident," Mr Gevisser writes.
Thabo Mvuyelwa Mbeki was born in 1942 in Idutywa in the Eastern Cape.
His father was a leading communist Govan Mbeki - a teacher, writer and newspaper publisher - and Epainette, also a teacher who ran a shop to feed the four children.
Mbeki grew up in rural Eastern Cape and his readings as a youngster revolved around the plight of the poor.
"I was born into the struggle," he has said.
South Africa has been devastated by Aids and HIV
After several schools and skirmishes with authorities in the Eastern Cape, he was sent to Johannesburg where he came under the guidance of Walter Sisulu, Mr Mandela's best friend and mentor.
When his father was arrested with Mr Mandela, he went to Sussex University in the UK, where he took a Masters degree and left to work in the ANC's London office.
Then followed spells in the Soviet Union for military training; Zambia, Botswana, Swaziland and Nigeria.
From 1978 onwards he rose in the ANC under the direct tutelage of Oliver Tambo, the organisation's president.
He was the organisation's chief spokesman, its head of international affairs and in the late 1980s was one of the five key ANC leaders who negotiated a settlement with the apartheid government.
The years of exile left numerous scars on Mr Mbeki and his family.
He lost a brother, Jama, who disappeared in exile.
Mr Mbeki's son - he made a young woman pregnant while in his teens - died while trying to follow his father out of South Africa.
The story is often told how Mr Mbeki only shook his father's hand when he met him for the first time after 28 years in 1989.
They apparently called each other "comrade".
In the late 1980s, with the end of apartheid in sight, Mr Mbeki played a key role in discussions between the exiled ANC and white political and business leaders in South Africa.
This bridge-building role continued after he returned to South Africa, and he can take much of the credit for reassuring South African and international business interests, and foreign governments, that a post-apartheid South Africa would be a safe place for their money.
Mr Mbeki has managed to swing important international leaders behind his Africa rejuvenation plan, the New Partnership for Africa's Development (Nepad).
Perhaps his biggest policy success has been South Africa's rapid economic growth since the end of apartheid and the rise of a black middle class - but to the anger of many, wealth is more unevenly distributed than ever before.
He has failed to convince the trade unions and the poorest South Africans that the government has acted in their interest since the end of apartheid.
And it was this that provided the space for Mr Zuma to mobilise a powerful constituency and end Mr Mbeki's leadership of the party - in which he has spent so much of his life - and his presidency.