Rajapaksa has been accused by diplomats of serious human rights abuses in the war against rebels from the Tamil minority.
Colombo: Just three years after being voted out in a presidential election in Sri Lanka, strongman Mahinda Rajapaksa is back at the centre of power, appointed prime minister by the man who defeated him.
President Maithripala Sirisena named the pro-China 72-year-old as his number two on Friday after abruptly dismissing the government of incumbent Ranil Wickremesinghe. Wickremesinghe has said his removal is unconstitutional and has demanded he be allowed to prove his parliamentary majority.
A mustachioed man usually dressed in a spotless white shirt, sarong and trademark maroon sash, Rajapaksa is seen as a hero by many in Sri Lanka's Buddhist majority. He wears rings as lucky charms, sometimes as many as eight, and he has been called the "lord of the rings".
Rajapaksa has been accused by diplomats of serious human rights abuses in the war against rebels from the Tamil minority, one of Asia's longest-running conflicts that ended during his tenure as president, in 2009. More than 100,000 people were killed in the 26-year war.
Rajapaksa said in a statement after he was sworn in he wanted to end religious and ethnic divisions in the country of 21 million people.
"We will eschew the politics of hate and set up an interim government that will protect the human rights of all citizens, that will protect the independence of the judiciary and establish law and order in the country," he said.
Almost immediately after he was sworn in, supporters of Rajapaksa invaded state media outlets in Colombo to take control of them, journalists there told Reuters.
Reporters Without Borders has called Rajapaksa "one of the world's biggest press freedom predators" during his two terms as president from 2005 to 2015.
Mavai Senathirajah, a legislator from the main Tamil political party, said it was a shock to the community that makes up 13 per cent of the population that Rajapaksa was back in power in three years.
"There are a number of accusations against him including war crimes. The president who accused Rajapaksa of corruption and rights abuses during the last election now has appointed him as his prime minister."
Born into a family of nine siblings in the southern village of Weeraketiya, Rajapaksa has spent four decades in politics, along with many of his relatives.
A lawyer by training, he followed his father into parliament in 1970, then the youngest-ever legislator, while several of his brothers and sons have held key roles in domestic and international politics.
His son Namal, a London-educated lawyer, took his record as the youngest MP in 2010.
Earlier in his career, Rajapaksa was known as a strong defender of human rights and participated in many left-wing and radical protests.
Before becoming president in 2005, he held a number of ministerial portfolios, and served as leader of the opposition from March 2002 until he was appointed prime minister in 2004.
He soon turned his attention to the civil war, boosting troop numbers and pushing into territory held by the Tamil Tiger rebels, leading to their surrender in 2009 and a landslide election win for Rajapaksa the year after.
The United Nations has said that thousands of civilians were killed in the last year of the war after heavy shelling by government forces. It has long sought a judicial investigation involving foreign judges and prosecutors to probe the alleged war crimes.
In a leaked diplomatic cable written in 2010, the United States' ambassador to Sri Lanka Patricia Butenis said that responsibility for alleged crimes against civilians during the war "rests with the country's senior civilian and military leadership, including President Rajapaksa and his brothers".
Rajapaksa's brother, Gotabaya Rajapaksa who was Defence Secretary during the final stages of the war, has faced allegations he maintained death squads.
The brothers rejected the allegations and said the military only targeted the Tamil Tigers, one of the most violent insurgent groups in the world at the time.
After winning a two-thirds majority in his second term in 2010, Rajapaksa amended the constitution to remove checks on the presidency, including the presidential two-term limit.
Rajapaksa is also known for drawing the country closer to China, borrowing billions of dollars from Beijing to the alarm of Sri Lanka's traditional ally India.
He opened up the country's main port to Chinese submarines when he was president, which stoked anger in India, while a huge new port funded by Chinese investment led to concerns Beijing's investment programme was a debt trap.
Rajapaksa blamed the Indian intelligence agency Research and Analysis Wing for rallying his opponents against him, leading to his loss in the 2015 election.
His return to power has drawn concern in New Delhi that China would tighten its grip on Sri Lanka, which is strategically placed at the head of the Indian Ocean.