Sri Lankan President Mahinda Rajapakse appeared unstoppable after overseeing a crushing defeat of Tamil guerrillas, but charges of corruption, nepotism and war crimes have dogged his second term in office.
Rajapakse, who is seeking an unprecedented third term at the helm, ruthlessly pursued the Tamil Tigers after taking power in 2005, earning a reputation as a strongman leader.
Since the end of a decades-long civil war in 2009 he has overseen a period of growing prosperity with average growth rates of 7.5 percent, built Sri Lanka's first expressway and rolled out new highways and railroads.
But opposition figures accuse Rajapakse of skimming large amounts of money from infrastructure projects funded through expensive foreign loans, often from China, his strongest foreign political and economic ally.
Victor Ivan, an author and longtime associate of the president, says Rajapakse had an opportunity to ensure reconciliation after winning the war, but instead focused on high-profile infrastructure projects.
"In recent years, he had stopped listening to close aides and become a bulldozer going downhill," Ivan told AFP.
"He is on a course of self-destruction."
The 69-year-old Sinhalese nationalist has faced criticism for placing his three brothers in key official positions to build a dynasty that effectively controls much of the national budget.
His family's domination of vital sectors of the national economy has led to discontent even within his own cabinet, leading his health minister Maithripala Sirisena to defect and challenge him in the election.
"We want to end the rule of Rajapakse Brothers and Company," Sirisena said repeatedly during the election campaign, a pledge that helped draw more defectors from the beleaguered regime.Authoritarian Leader
Some of the strongest criticism of Rajapakse has come from outside Sri Lanka.
He has repeatedly refused to allow any international scrutiny of his rights record, including allegations that his troops killed some 40,000 Tamil civilians in the final months of fighting against the Tamil Tiger separatists.
Navi Pillay, then UN rights chief, accused him of becoming an authoritarian leader after his 2013 sacking of chief justice Shirani Bandaranayake whose rulings went against his regime.
A veteran street-fighter politician who entered parliament aged 24, he had no qualms about falling out with the West.
When the United States and the European Union cut off aid, Rajapakse leaned heavily on China, Iran and Libya as well as other Asian nations for cash and arms to fight the Tigers.
At home, although despised by the minority Tamil community, Rajapakse retained popular affection among Sri Lanka's majority Sinhalese community who wholeheartedly endorsed his crushing of the Tamil Tigers.
A lawyer by profession, Rajapakse took on the part of an army general in the 1993 Sinhalese movie, "Nomiyana Minusun" (The Immortals). In real life, as commander-in-chief, he achieved the single goal of his first term: the Tigers' extinction.
However, much of the euphoria that followed the end of a war in which around 100,000 people died has evaporated in the five years that have followed.
The ruling party saw a 21-point dip in its vote at a local election in September, the worst decline since Rajapakse came to power nearly a decade ago.
When he controversially removed the two-term limit on the presidency, many thought Rajapakse could be supreme leader for life.
The president boasts an easy charm with ordinary people, including a penchant for kissing babies, while voters have also warmed to his wife Shiranthi, a former Miss Sri Lanka.
But opposition parties have rallied behind Sirisena.
Sources say Rajapakse consulted his astrologer before calling Thursday's snap election two years ahead of schedule.
With many close aides now questioning that decision, the astrologer is reportedly in hospital after suffering a heart attack last week -- just as the Rajapakse campaign got tougher.