Wickremesinghe was sworn in by President Maithripala Sirisena, who sacked him on October 26 and triggered a power struggle that brought the country's government to a standstill

COLOMBO: United National Party leader Ranil Wickremesinghe was sworn in as the Prime Minister of Sri Lanka on Sunday, ending a 51-day power tussle in the island nation that had crippled the government.

Wickremesinghe, 69, was administered the oath of office by President Maithripala Sirisena, who had sacked him on October 26 in a controversial move which plunged the island nation into an unprecedented constitutional crisis.

The UNP leader had refused to step down asserting that his sacking was illegal.

His re-appointment comes a day after former strongman Mahinda Rajapaksa, who was installed as Prime Minister by President Sirisena, resigned Saturday, after two crucial Supreme Court decisions made his efforts to cling to premiership untenable.

According to media reports, a new Cabinet will be sworn in on Monday.

The Cabinet will consist of 30 members and include six Sri Lanka Freedom Party (SLFP) parliamentarians.

Earlier, Wickremesinghe's party said it was ready to work with President Sirisena, who was "misled by some groups" against the unity government.

UNP deputy leader Sajith Premadasa said that he was not surprised that the President had agreed to appoint Wickremesinghe as Prime Minister again despite taking a firm position earlier that he will not appoint the UNP leader.

"This showed the true character of the President," he was quoted as saying by the Colombo Gazette.

Premadasa said that the President was "misled by some groups who were against the unity Government" and this resulted in the President removing Wickremesinghe.

"But now truth has prevailed," he said. "The party is prepared to work with Sirisena again in the government."

Premadasa said, "The lessons from the incident must be used to strengthen the foundation of democracy and promote justice and fairness."

Rajapaksa, 73, had sought to secure a majority in the 225-member Parliament but failed. Sirisena then dissolved Parliament and called snap elections on January 5. However, the Supreme Court overturned his decision and halted the preparations for snap polls.

The Supreme Court on Thursday unanimously declared that the dissolution of Parliament by Sirisena was "illegal".

The apex court on Friday also refused to stay a court order restraining Rajapaksa from holding the office of Prime Minister until it fully heard the case next month.

Rajapaksa signed his resignation letter during a multi-religious service at his home that was attended by several lawmakers of United People's Freedom Alliance (UPFA), Buddhist and other religious leaders.

After signing the resignation letter, Rajapaksa said that following the February 10 local government election, the aim of his party is to have a general election.

However, he said that he has no intention of remaining as Prime Minister without a general election being held, and in order to not hamper the President in any way, he resigned from the position of Prime Minister and made way for the President to form a new Government.

Rajapaksa said that since a general election can no longer be held, the UPFA cannot implement any of the measures they had planned to take "to prevent the country from becoming another Greece." Most of the countries had not recognised Rajapaksa's government.

The global credit rating agencies -- the Fitch, the Standard & Poor's and the Moody's -- had also downgraded Sri Lanka's rating owing to the current political crisis.

Debt Fears

On Wednesday, the legislature voted overwhelmingly to demand the reinstatement of Wickremesinghe.

Sirisena's resistance became untenable after the country's highest court last week ruled that he acted outside the constitution when he dissolved parliament in early November and called early elections.

The Supreme Court also confirmed that Rajapakse could not exercise the powers of a prime minister until he proved his legitimacy -- which without enough support in parliament was impossible.

Sirisena's disputed appointee had pressed ahead, forming a purported government and naming a cabinet even as parliament cut off state funds to his office.

But on Saturday Rajapakse -- who presided over the bloody end to Sri Lanka's civil war in 2009 -- backed down from the post of prime minister, signalling the 51-day standoff had come to a bitter close.

The strongman, whose past administrations were accused of gross rights abuses and whose family still holds considerable sway in Sri Lanka, promised to make a comeback at local council elections.

"There is no doubt at all that the people who stood by us since 2015 will continue to support us in the future as well," he said addressing his close associates.

"We will bring the forces opposed to the country down to their knees by organising the people."

His aides said he was returning a fleet of limousines he had used since his disputed appointment.

The country has been heading for a government shutdown as parliament failed to approve spending for 2019, and credit rating agencies downgraded its debt amid fears of a sovereign default.

There were doubts about the country's ability to repay $1.5 billion due to bond holders by January 10 without a legally constituted administration.

Some factions within Sri Lanka's parliament have pushed for Sirisena to be investigated for orchestrating an alleged coup.