COLOMBO (Reuters) - Sri Lankan Prime Minister Ranil Wickremesinghe said on Friday he planned to stay in office and reshuffle his cabinet in the wake of a stinging loss in local elections for both parties in the ruling coalition.

Slideshow ( 2 images )

Wickremesinghe’s center-right United National Party (UNP) and President Maithripala Sirisena’s center-left Sri Lanka Freedom Party (SLFP) were routed by a party backed by former President Mahinda Rajapaksa in local polls last weekend, plunging the government into crisis.

Since the election, Sirisena has been in talks with Wickremesinghe’s party as well as opponents led by Rajapaksa, whom he defeated in a presidential vote in 2015 polls, on forming a new government.

The central bank chief said the a political uncertainty this had created could weigh on Sri Lankan economic growth this year.

On Friday, Wickremesinghe told a news conference in Colombo he had decided to stay in office despite the election blow.

“It was a big setback for the government parties, but we have time to correct it. We are looking at reshuffling some of the ministries where it is necessary.”

He said the main reasons for his party’s defeat were the sluggish economy and high cost of living, partly due to intermittent floods and a prolonged drought, and the government’s failure to implement strong anti-corruption measures.

When Sirisena won the presidency in 2015, backed by Wickremesinghe’s party, he had promised reforms, anti-corruption measures and punishment for those who plundered public funds under the previous Rajapaksa regime.

But Wickremesinghe’s own government has faced corruption allegations over a bond scam and it has failed to deliver the corruption crackdown promised.

The government has promised a new constitution aimed at devolving some powers to provincial governments dominated by ethnic minorities, and it has said it will facilitate an international probe into alleged war crimes in the final phase of a 26-year civil war. It has also promised IMF-backed fiscal discipline efforts.

Nationwide elections are not due until 2020. The president can bring the vote forward if two-thirds of parliament endorses such a move. He also cannot remove the prime minister directly, according to a constitutional amendment introduced in 2015.