Anwar Ibrahim's spirited but unsuccessful bid to exact revenge on the Malaysian regime that cast him aside years ago could herald the sunset of one of Asia's most tumultuous political careers.
Anwar's triumphs and tribulations have riveted and appalled Malaysians since the late 1990s, when he soared to the pinnacle of Malaysian power, only to fall spectacularly, but rise again.
But Anwar, 65, has vowed to step aside for a new generation of opposition leaders if his Pakatan Rakyat (People's Pact) failed to oust the coalition that has controlled Malaysia since independence in 1957.
After hard-fought Sunday polls, the regime was still standing, casting doubt on the future of Malaysia's political chameleon.
The charismatic Anwar first rose to prominence as a radical Islamic student leader, catching the eye of hardline former leader Mahathir Mohamad, who dominated Malaysian politics for more than two decades until he retired in 2003.
A gifted natural politician, Anwar rose quickly in the United Malays National Organisation (UMNO), the ultimate power in the decades-old Barisan Nasional ruling coalition.
He headed various ministries before taking the key finance ministry portfolio in 1991, casting himself as a reformist who was lionised in the West.
Two years later, he was all but anointed Malaysia's future leader when he was named deputy prime minister.
But as Asian economies toppled in the 1998 regional financial crisis, a bitter rift emerged with Mahathir, who was infuriated by Anwar's calls for reform and an end to corruption and nepotism.
Anwar was seen by many to have misplayed his hand, underestimating the proud and canny Mahathir, and was sacked and charged with corruption and sodomy.
In a drama that earned worldwide criticism, Anwar was brought into court with a black eye after a beating from the country's police chief.
The stunning fall from grace was widely seen both at home and abroad as politically motivated and triggered unprecedented protests in a country where dissent was suppressed.
"I learned that this was a corrupt and brutal regime that had to be defeated," he told AFP recently.
Anwar says he was kept in solitary confinement, singing 1960s pop tunes to stay sane and reading the Koran, the Bible, Shakespeare -- anything he could get.
Released in 2004 when the sodomy charge was overturned, Anwar emerged in poor health and spent time working as an academic.
But politics was left polarised by his ouster and he later joined the opposition, leading it to an unprecedented 2008 polls showing, winning control of five states and more than a third of parliament and shocking UMNO.
The opposition had capitalised on rising anger over corruption and oppressive tactics.
The ruling elite was shaken to the core by the results, and an unsuccessful bid by Anwar shortly afterwards to seize control of parliament through defections.
But not long after the 2008 vote, Anwar was hit with fresh charges of allegedly sodomising a young aide, which he called another UMNO bid to wreck his comeback. He was finally acquitted last year.
Anwar is famed for an ability to captivate a crowd, and his appeal across multi-ethnic Malaysia's racial lines is credited with breathing new life into a disparate opposition comprising Chinese, Muslims and his own multi-racial party.
On Sunday, it proved unable to draw enough votes to overcome the regime's track record of stability and economic growth, control of traditional media, deep pockets and an electoral system critics call biased.
But Anwar is widely credited with helping create a political scene in which people are no longer afraid to question Barisan.
"People have to accept that I have given all that I have," Anwar recently told AFP, speaking of his intention to step aside with an opposition loss.
"I have given a lot of my personal life and suffered immensely."
Following the election, he has not yet discussed his next step.
But his name will remain in politics through his daughter Nurul Izzah Anwar, 32, one of his six children and a rising opposition star in parliament.