Sri Lanka’s acting President and Prime Minister Ranil Wickremesinghe on Thursday was sworn in as the new president of the country that is grappling with its worst financial crisis.

Wickremesinghe on Wednesday secured 134 votes in the 225-member parliament of the island nation.

A six-time prime minister, Wickremesinghe was sworn in as the eighth president by Chief Justice Jayantha Jayasuriya at the country's parliament complex.

Wickremesinghe had told reporters on Wednesday that he wanted to bring everyone together "so that a national consensus is formed." He also said he is a "friend of people" and "not a friend" of the Rajapaksa clan.

Sri Lankans reportedly blame the Rajapaksa political dynasty for the crisis.

Former President Gotabaya Rajapaksa fled the country and resigned last week amid mass protests. Subsequently, Wickremesinghe was sworn in as the country's interim president.

Rajapaksa fled Sri Lanka after thousands of protesters stormed the presidential palace in the capital Colombo and set fire to the prime minister’s house. Rajapaksa’s brother Mahinda resigned as the prime minister in May.

Crippled by a shortage of foreign exchange reserves after the collapse of its tourism-dependent economy, the country of 22 million people has defaulted on all its foreign debt.

It has been unable to pay for food, fuel and other essentials, with the fuel shortage in turn leading to prolonged daily power cuts. Schools have been closed and state employees asked to work from home.

The government is negotiating with the International Monetary Fund for a bailout package, but no deal has been finalized so far.