Profile: Mahinda Rajapaksa
Long-time Sri Lankan leader Mahinda Rajapaksa, who has admitted defeat in the presidential election, was a leader credited by many Sinhalese people with winning the war against Tamil Tiger rebels who fought for more than 20 years for self-rule.
But his tenure in power - especially at the time of the final defeat of the rebels in 2009 - was dogged by allegations of serious human rights abuses.
While he and his supporters argue that he had to act firmly and decisively to defeat one of the world's most dangerous terror groups, critics say that he presided over the indiscriminate shelling of civilians at the end of the war and has done little or nothing to stop the alleged rape and torture of Tamil civilians by the Sri Lankan security forces since it concluded.
Furthermore it is alleged that he made no real effort to seriously engage with Tamils - who comprise about 15% of the population - instead opting to order a wave of repression directed at those who question his authority.
Mr Rajapaksa is a former lawyer who has described himself on his website as "a rebel with a cause". His core support is rural, conservative, Buddhist and dominated by the Sinhalese majority.Ruthless streak
He won power in 2005 and became South Asia's longest-serving leader. He sought an unprecedented third stint in office in January 2015, having defeated his last challenger - former army chief Sarath Fonseka - to win re-election to a second term in January 2010.
Gen Fonseka was later jailed for implicating the government in war crimes.
In both triumphs, Mr Rajapaksa's critics say he displayed a ruthless streak and a capacity to condone or overlook the use of violence if it served his political purposes. The president has consistently denied this, arguing that at the end of the war it was the rebels who failed to separate combatants from civilians, thereby exposing innocent people to incoming fire.
Whatever the truth, his hold on power was not seriously challenged for almost a decade, either from within his own party or from the ranks of the opposition. Reports abounded that he was grooming his eldest son, Namal, to succeed him.
However, a former cabinet minister and ally - Maithripala Sirisena - stood against him in the most recent election. Mr Sirisena had the backing of many voters and main opposition parties. Mr Rajapaksa accepted defeat and left the presidential palace hours before official results were announced.'Unbridled corruption'
Mr Rajapaksa used his time in power to consolidate his position. The constitution was changed to allow him to serve a third term, and three brothers were awarded influential positions, leading to accusations he is running the country like a family firm.
The dynasty effectively controlled much of the national budget.
He was also accused of condoning a crackdown on dissent, and his supporters are alleged to have been involved in the murder of journalists who were critical of the government, claims rejected by the authorities.
The most high profile example of this was the murder of newspaper editor Lasantha Wickrematunge in January 2009.
His case was all the more remarkable because he wrote an editorial - published posthumously - which accused President Rajapaksa's government of being responsible for his death.
"In the name of patriotism you have trampled on human rights, nurtured unbridled corruption and squandered public money like no other president before you," Mr Wickrematunge's editorial said in words addressed directly at the president.
The president and his supporters strenuously denied any involvement in the murder.
His tenure in power was also characterised by impressive economic growth and ambitious infrastructure projects, including the construction of a new section of motorway connecting Colombo's international airport with its political and commercial centre.
His supporters say that continued economic growth also brought other benefits, ensuring for example that food supplies remained constant after the devastating 2004 tsunami.
When money from the West looked as if it may dry up because of concerns over human rights abuses towards the end of the civil war, the president tried to offset this by making overtures to China.
Some $360m (£226m) of borrowed Chinese money helped build a huge deep-water port at Hambantota - near the president's birth place - on the southern coast. Other major projects include a 35,000-seat cricket stadium, a convention centre, a new international airport and a broad-gauge railway.Hardliner
Mr Rajapaksa, 69, became the country's youngest ever parliamentarian in 1970 at the age of 24.
He went on to become leader of the Sri Lanka Freedom Party, prime minister in 2004, and then president in 2005.
He comes from a political family - his father, DA Rajapaksa, represented the same region of Hambantota from 1947 to 1965.
When Mr Rajapaksa became prime minister, he was seen as someone who favoured a negotiated settlement with the Tamil Tiger rebels.
But after signing a poll deal with two nationalist parties, his stance became increasingly hard-line.
He launched his campaign for the presidency by rejecting the rebels' demands for Tamil autonomy.
After four years of bitter fighting, President Rajapaksa hailed the defeat of the rebels as a vindication of his tough and uncompromising stance against them.
His cause has been helped by his image as a folksy, back-slapping man of the masses. The president is renowned for remembering peoples' names, and stripping to the waist when he visits temples.
He will be hoping the Sinhala heartlands, where the vote will be decided, reward him for victory in war and economic progress.