Sri Lanka’s president has re-appointed Ranil Wickremesinghe as prime minister, nearly two months after firing him and setting off a long political stalemate in the South Asian island nation.

The move promises to ease the crisis, but could also be the beginning of a difficult alliance between Mr Wickremesinghe and President Maithripala Sirisena, who are in now rival camps.

A new Cabinet is expected to be sworn in soon.

Mr Wickremesinghe’s United National Party said on its official Twitter account that he took the oath before Mr Sirisena. The swearing in took place privately, with only a few politicians in attendance.

Sri Lanka Politics
Sri Lanka’s disputed former prime minister Mahinda Rajapaksa (Eranga Jayawardena/AP)

“Now I will assume duties of the office of prime minister,” Mr Wickremesinghe told cheering supporters gathered at his official residence after he was sworn in.

“Unfortunately, during the past few weeks, the progress of this country and the development programmes that we undertook were stalled,” he said.

“Not only that, the country went backward. Today we commit firstly to bring back normalcy and resuming the development programme.”

Mr Sirisena abruptly dismissed Mr Wickremesinghe on Oct. 26 and appointed former president Mahinda Rajapaksa in his place.

Mr Wickremesinghe insisted his removal was unlawful. Mr Rajapaksa, meanwhile, failed to get Parliament’s approval, losing two no-confidence votes.

But Mr Rajapaksa continued to hold office with Mr Sirisena’s support, and his opponents went to court.

The Court of Appeal suspended Mr Rajapaksa and his cabinet from functioning in their offices.

Mr Rajapaksa asked the Supreme Court to lift the suspension, but it refused and extended the suspension until mid-January, forcing Mr Rajapaksa to resign on Saturday.

Sri Lanka had been without a government from the time Mr Rajapaksa was suspended by the Court of Appeal and was facing the danger of being unable to spend government money from January 1 without a budget.