When long-time Sri Lankan leader Mahinda Rajapaksa was defeated in the presidential elections of January 2015, it looked like his years in power were over and the island nation was entering a new political era.
His attempt to win an unprecedented third term - after changing the constitution to allow such a bid - had failed. Months later, an attempt to lead Sri Lanka by becoming prime minister was also thwarted.
But less than five years later, he is back at the top - albeit this time as interim prime minister, serving as the right-hand man of the new president, his younger brother Gotabaya.
For those who celebrate him for defeating the Tamil Tiger rebels, who fought a bloody civil war for more than 20 years for self-rule, it is a moment to celebrate.
But there are many others who feel they have good reason to fear the Rajapaksas' return: they remember the wave of repression directed at those who questioned Mahinda's authority.
His decade as president was dogged by allegations of serious human rights abuses, as well as claims - which he strenuously denies - that he was corrupt while in power.
His critics say he presided over the indiscriminate shelling of civilians at the end of the war in 2009 and did little or nothing to stop the alleged rape and torture of Tamil civilians by the Sri Lankan security forces after it concluded.
Supporters, however, argue he had to act firmly and decisively to defeat one of the world's most dangerous militant groups. And in the wake of the Easter Sunday bombings earlier this year - which left more than 250 people dead and sent a shock of fear across Sri Lanka - those qualities are appealing to many Sri Lankans.
Mr Rajapaksa is a former lawyer who previously described himself on his website as "a rebel with a cause". His core support is rural, conservative, Buddhist and dominated by the Sinhalese majority, boosted by his image as a folksy, back-slapping man of the masses.
He has long been renowned as a cunning political operator. However, his career took a significant nosedive in 2015. He underestimated the level of support for his rival to the presidency, Maithripala Sirisena, in the January presidential vote and failed eight months later to secure political rehabilitation by winning the premiership.
But out in the cold, he began to rebuild. A new political party, filled with loyalists, emerged from the ashes and won a landslide victory in 2018's local elections.
Then, in October 2018, as the country was gripped by a constitutional crisis, he was appointed prime minister. It was short-lived - he resigned the post just seven weeks later - but gave some hint of what was to come.
Less than a year later, he was sworn in as interim prime minister.
Mr Rajapaksa was first elected MP in 1970 when, at 24, he became the country's youngest ever parliamentarian.
He had been born into a political family - his father, DA Rajapaksa, represented the same region of Hambantota from 1947 to 1965 - and soon worked his way up through the ranks.
He went on to become leader of the Sri Lanka Freedom Party, serving a short stint as prime minister in 2004.
The next year, he became president, going on to become South Asia's longest-serving leader after beating his 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.
Mr Rajapaksa's critics say his political career displays a ruthless streak and a capacity to condone or overlook the use of violence if it serves his political purposes.
The former 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. (The UN has accused both sides of atrocities.)
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, Mr Sirisena, a former cabinet minister and ally, stood against him in 2015 and - somewhat unexpectedly - won the backing of many voters and main opposition parties. Mr Rajapaksa accepted defeat and left the presidential palace hours before official results were announced.
Mr Rajapaksa used his time as president 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 that he was 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 to the president.
The president and his supporters insisted that they had nothing to do with the murder.
His tenure 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 dried up because of concerns over human rights abuses towards the end of the civil war, Mr Rajapaksa 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 former president's birthplace - on the southern coast. It has been a project mired by corruption allegations.
Other major projects include a 35,000-seat cricket stadium, a convention centre, a new international airport and a broad-gauge railway.