With the 18th amendment to the constitution, he introduced safeguards that enabled him to remain in power with term limits removed.
He held a two-thirds majority in parliament and controlled the state media, judiciary, security apparatus and the economy.
His extended family held all key posts. He believed, and his supporters and political appointees believed, he was invincible.
Rajapaksa was confident of the support of the majority Sinhala-Buddhist voters, who considered him their saviour for militarily defeating the minority separatist rebels, the Liberation Tigers of Tamil Eelam, and ending a 30-year war.
The first crack in the Sinhala vote appeared in September 2014 at the Uva Provincial Council election. His United People’s Freedom Alliance won 72.39% of the vote in 2009.
In 2014 it fell to 51.24%, a loss almost entirely picked up by the main opposition United National Party. More that 80% in that province are from the Sinhala-Buddhist community. Clearly Rajapaksa’s base was split.
Most analysts and the opposition believe that this prompted Rajapaksa to go for a snap Presidential election in January 2015, two years before his second term as president would end.
His confidence of winning was boosted because of a fragmented opposition and his expectation that UNP leader Ranil Wickremesinghe would be his opponent.
Used to steamrolling any resistance to his plans, and whipping up the terrorist and international conspiracy bogey to instil fear in the population, he was unprepared for the public opposition that had been building up for some time.
Disparate groups from amongst academics, artistes, civil society activists, retired diplomats and civil servants, weary of his family and their disregard for law and order, and their corrupt practices and nepotism, had been working for months towards a common goal: abolishing the executive presidency.
The idea by a well-known Buddhist prelate, the Ven. Sobitha Thero, that a common opposition candidate be fielded to achieve that goal, fired up those wanting a change.
The search for a common candidate intensified after the presidential poll was called and Rajapaksa appeared amused at the opposition’s inability to come together.
But then Maithripala Sirisena, Secretary General of Rajapaksa’s Sri Lanka Freedom Party, his Minister of Health, quit the government to contest as the common candidate.
Rajapaksa’s campaign, preparing to take on a weakened UNP, was thrown completely out of gear.
Civil action groups formed under the “Purawesi Balaya”, Citizens’ Force umbrella, drew members of ethnic groups and parties, academics, artistes, and religious leaders to end the Rajapaksa regime and restore just rule. Many of Rajapaksa’s own ministers and MPs joined the opposition.
Yet, the short sharp campaign placed the opposition at a disadvantage because state-controlled Sri Lanka media openly sided with Rajapaksa.
Though much of the private media remained largely neutral, its limited countrywide reach made it difficult for the opposition to get its message to the grassroots.
Their social media campaign, however, mainly on Facebook, which the state could not block, was successful despite internet penetration again reaching only the urban masses.
The Rajapaksa election apparatus, that attempted to hold its base by harping on its war success and warnings that Sirisena would divide the country, did not have the effect they hoped for. On Dec 8, Sirisena was elected President, garnering 51.28% of the vote to Rajapaksa’s 47.58%.
Though the win is just over 400,000, the voting pattern showed that Sirisena has wide acceptance among the minorities and urban voters.
While Rajapaksa held much of his base support in the rural Sinhala heartland, the North and East Muslim and Tamil minorities voted massively for Sirisena.
Sirisena has a tough task ahead of him. Public confidence in the judiciary, the police, the administration and the media has been deeply compromised by the Rajapaksas, who rode rough shod over everyone.
Restoring faith in these institutions is of primary importance, and Sirisena has pledged to do so.
As well, keeping the disparate coalition of parties together to implement his agenda of good governance will be no cakewalk.
Sirisena has vowed to devolve much of his presidential powers to parliament.
Wickremesinghe, the new Prime Minister, now has to attract enough members of parliament to his side to cobble together a majority.
He has announced that his cabinet will be one of “national unity” comprising MPs from all willing parties.
In his first formal address as President, Sirisena made a few but profound promises; to rebuild Sri Lanka’s agricultural sector, restore confidence in the Police and the Judiciary, and repair relations with other countries.
Coming forth as a simple person with a clear agenda is the easy part. Getting it done in a country wasted by years of war and a decade of autocratic misrule will not be easy.
Yet for Sri Lankans now, there is hope.
Arjuna Ranawana (firstname.lastname@example.org) is a veteran Sri Lankan journalist who lives and works in Canada. The views expressed here are entirely the writer’s own.