Sri Lankan shares closed higher on Wednesday, hours after the country's lawmakers voted in Ranil Wickremesinghe as the new president.

At the close of trade, the CSE All-Share index was 0.89% higher at 7,712.08.

The six-time prime minister garnered 134 votes in the 225-member parliament, despite public anger with the ruling elite after months of severe shortages of fuel, food and medicines.

Wickremesinghe takes over after an uprising in the country amid a devastating economic crisis forced Gotabaya Rajapaksa to flee to Singapore and resign as president.

The island-nation of 22 million is facing its worst economic crisis in seven decades, unable to pay for essential imports such as fuel and medicine due to a severe shortage of foreign exchange.

On the CSE All-Share index, trading volume rose to 82.7 million shares from 66.8 million shares in the previous session.

The equity market turnover was 1.34 billion rupees ($3.74 million), up from 1.12 billion rupees in the earlier session, according to exchange data.

Foreign investors were net buyers in the equity market, purchasing 220 million rupees worth of shares, while domestic investors were net sellers, offloading 1.12 billion rupees worth of shares, the data showed.

(Reporting by Tanvi Mehta in Bengaluru; Editing by Vinay Dwivedi)