Rajapaksa was elected president in 2005 as the candidate of the United People’s Freedom Alliance (UPFA). At the time, the Sri Lankan government was in the midst of ongoing peace talks and a precarious cease-fire agreement with the Liberation Tigers of Tamil Eelam (LTTE), better known as the Tamil Tigers, the guerrilla organization that sought to establish an independent Tamil state in northern and eastern Sri Lanka. Nevertheless, Rajapaksa announced his intention in 2006 to eradicate the separatist group, which had operated as both a rebel army and a de facto government in parts of Sri Lanka for more than 20 years. In 2009 the Sri Lankan army defeated the Tamil forces, ending the country’s long civil war. Rajapaksa’s popularity surged, but international observers criticized his army’s brutality in the war’s final battle, which had led to many civilian deaths.
Throughout Rajapaksa’s presidency he worked to develop the country’s business and tourism sectors as well as its infrastructure. A key development project was a new port in his home district of Hambantota, built with aid from China.
Rajapaksa’s second term oversaw sustained economic growth, and he continued to enjoy the strong support of the large Sinhalese majority in the country. However, his administration became increasingly associated with strong-arm tactics and other repressive measures against political opponents and civil rights advocates. In addition, relations with Western countries were strained over Sri Lanka’s refusal to allow independent investigations of the military’s treatment of Tamils at the end of the civil war in 2009. Though the economy was growing, many observers worried that the rapid increase in national debt and the reliance on foreign investment would turn into a debt trap for the country. Rajapaksa’s domestic popularity appeared to wane during 2014 because of rising prices and concerns of corruption and abuse of power, and, in an attempt to secure another presidential term before losing support, he again called for an early presidential election. The poll, in early January 2015, proved to be an upset, as Maithripala Sirisena, formerly a member of the cabinet, defeated Rajapaksa and was sworn in as president. Later that year Parliament restored a constitutional two-term limit on the presidency, precluding Rajapaksa from running again. In August Rajapaksa was elected to Parliament, representing the Kurunegala district.
In October 2018 Sirisena fired his prime minister, Ranil Wickremesinghe, and attempted to appoint Rajapaksa in his place. Wickremesinghe challenged the move as unconstitutional. When it became clear that Parliament would not approve Rajapaksa’s appointment, Sirisena dissolved the legislative body in early November. The Supreme Court intervened, suspending the dissolution until it could rule on its legality. Parliament passed two votes of no confidence against Rajapaksa in the days that followed, but Rajapaksa’s allies rejected the legality of the votes. In December the Supreme Court ruled that Sirisena could not dissolve Parliament, and Rajapaksa stepped down to avoid further stalemate. Meanwhile, Rajapaksa and his supporters in Parliament defected from the ruling party and joined the Sri Lanka Podujana Peremuna party (SLPP), founded by his brother Basil, and Mahinda formally became leader of the opposition.
His political fortunes improved in 2019, after Easter morning explosions that killed hundreds put many Sri Lankans on edge about the country’s security. For many Sinhalese, Rajapaksa offered promise for security amid fears of renewed violence in the country. As presidential elections slated for November approached, the SLPP announced the presidential candidacy of his brother Gotabaya, who had served as his hawkish defense minister in the final years of the civil war. Mahinda was made party leader the same day, setting him up as a contender for the office of prime minister. Carrying the vote of the Sinhalese majority, Gotabaya won the presidential election. Wickremesinghe resigned from the premiership days later, and Mahinda became prime minister in his stead on November 21, 2019.
The Rajapaksas maintained an image of security and stability in 2020 as the global COVID-19 pandemic took hold, especially as Sri Lanka reported much lower rates of COVID-19 infections and deaths than other South Asian countries. Mahinda sought to capitalize on this image to increase the SLPP’s number of parliamentary seats in the legislative elections scheduled for August 5—twice delayed because of the pandemic—with the purpose of enabling the party and its allies to amend the constitution and expand the powers of the presidency.