COLOMBO - Sri Lanka's economy shrank 11.8% in the July-September quarter from a year ago, the second worst for the country, government data showed on Thursday, as it struggled with deep unrest sparked by its most severe financial crisis in decades.

An acute dollar shortage, caused by economic mismanagement and the impact of the COVID-19 pandemic, left Sri Lanka short of dollars for essential imports including food, fuel, fertiliser and medicine.

The state-run Census and Statistics Department said that agriculture shrank 8.7% in the third quarter and industries 21.2%, while services dropped 2.6%, from a year earlier.

"This is the second worst contraction Sri Lanka has experienced in a quarter after a 16.4% contraction in the second quarter of 2020," said Dimantha Mathew, head of research at First Capital.

"Our projection was that it would be much worse - possibly a contraction of about 20% but now overall contraction for the year could be about 9%."

Sri Lanka's central bank estimates the economy will contract by about 8% in 2022.

A multitude of factors including high inflation, power cuts, high interest rates, import shortages and fuel and fertiliser shortages impacted growth in the last quarter, the government said.

A "decrease in the demand of essential and non-essential goods and services due to the reduction of the real income of the people have directed the economy towards this decline," it said.

Widespread protests triggered by economic hardship spiralled in July with former President Gotabaya Rajapaksa fleeing the country and then resigning after thousands of protesters occupied his office and official residence.

The economy had contracted 8.4% year-on-year in the second quarter, one of the worst performances in the island of 22 million people. It contracted 1.6% year-on-year in the first quarter.

(Reporting by Uditha Jayasinghe; Editing by Krishna N. Das)