There have been violent scenes in Sri Lanka, with mobs targeting the homes of prominent political figures such as the ruling Rajapaksa family.

Prime Minister Mahinda Rajapaksa has resigned over the government’s handling of the island nation’s worst economic crisis since gaining independence from Britain in 1948. However, his brother is refusing to step down as president.

Protests over rising prices and shortages flared up in early April in the capital, Colombo, and have grown in size and spread across the country.

People are furious because the cost of living has become unaffordable. They are paying up to 30% more for food than a year ago. This has forced many people to skip meals.

There are also fuel shortages and power cuts, and a lack of medicines has brought the health system to the verge of collapse.

The ruling Rajapaksa family has been a particular target, with protestors attempting to storm the prime minister’s official residence while Mahinda Rajapaksa was inside, and attacking family houses elsewhere in Sri Lanka.

The family has been influential in Sri Lankan politics for several decades.

Although Mahinda has resigned as prime minister, his brother, Gotabaya, remains president and has said he has no intention of quitting. Last week, he declared a state of emergency as the country’s crisis deepened.

Nearly all the ministers in his government have resigned and several MPs have withdrawn their support for the government.

Sri Lanka’s problems come down to the fact that its foreign currency reserves have virtually run dry.

The country is heavily reliant on imports, but can no longer afford to pay for staple foods and fuel.

The government blames the Covid pandemic, which all but killed off Sri Lanka’s tourist trade – one of its biggest foreign currency earners.

It also says tourists were frightened off by a series of deadly bomb attacks on churches three years ago.

However, many experts say economic mismanagement is to blame.

At the end of its 30-year civil war in 2009, Sri Lanka chose to focus more on its domestic markets instead of selling to foreign ones. So income from exports remained low, while the bill for imports kept growing.

Nowadays, Sri Lanka imports $3bn (£2.3bn) more than it exports every year.

The government also racked up huge debts with countries including China, to fund what critics have called unnecessary infrastructure projects.

At the end of 2019, Sri Lanka had $7.6bn (£5.8bn) in foreign currency reserves. However, by March 2020 its reserves had dwindled to only $1.93bn (£1.5bn).

Several populist policies have also been blamed for worsening the situation.

When he came to power in 2019, President Rajapaksa decided to offer big tax cuts. This means the government now has less money to buy foreign currency.

Mr Rajapaksa and his new finance minister Ali Sabry now admit the tax cuts were a “mistake”.

When Sri Lanka’s currency shortages became a really big problem in early 2021, the government tried to stop the outflow of foreign currency by banning all imports of chemical fertiliser, telling farmers to use organic fertilisers instead.

This led to widespread crop failures. Sri Lanka had to supplement its food stocks from abroad, which made its foreign currency shortage even worse.

Since then, the government has banned the import of a wide range of “non-essential” items – from cars to certain types of food and even shoes.

One way that countries can boost their exports is to cut the value of the currency, but the government refused to let the Sri Lankan rupee fall against other currencies.

It finally did so in March 2022, and the rupee fell more than 30% against the dollar.

Sri Lanka’s government has racked up $51bn (£39bn) in foreign debt.

This year, it will be required to pay $7bn (£5.4bn) to service these debts, with similar amounts for years to come.

In April, the Sri Lankan government failed to make repayments totalling $78m. Credit rating agency S&P called this a “selective default”.

It was the first time Sri Lanka had defaulted on its foreign debts since independence.

Sri Lanka is seeking emergency loans of $3bn to pay for essential imports such as fuel.

The World Bank has agreed to lend it $600m. India has committed $1.9bn and may lend it an additional $1.5bn for imports.

The government is also seeking a bail-out from the International Monetary Fund (IMF).

However, the IMF has said the government must raise interest rates and taxes as a condition for a loan, which would make the country’s cost of living crisis worse.

Sri Lanka owes $6.5bn to China and the two are in talks on how to restructure the debt.

China earlier agreed to bolster Sri Lanka’s foreign currency reserves by swapping the Lankan rupee for its currency, the renminbi. Since then, it has signalled its displeasure over Colombo approaching the IMF for help.