Brazil's economy shrank 4.1 percent in 2020, officials said Wednesday, closing out what analysts called another "lost decade" for Latin America's biggest economy with a year badly disrupted by the coronavirus pandemic.

The contraction, which was roughly in line with analysts' forecasts, adds to a bad run for a country that was just recovering from a devastating two-year recession in 2015 and 2016.

Although Brazil's economy gained some steam in the fourth quarter of 2020, with better-than-expected growth of 3.2 percent, there are signs the recovery is weakening in 2021 -- bad news for far-right President Jair Bolsonaro, who is up for re-election next year.

"The (Brazilian) economy had one of the better performances in Latin America last year," consulting firm Capital Economics wrote in a note.

"But there is strong evidence to suggest that the recovery has slowed so far this year, and the worsening Covid-19 outbreak is casting a dark cloud over the outlook for the next few months at least."

It was the third-worst annual drop in gross domestic product (GDP) on record for Brazil, after 1981 (-4.25 percent) and 1990 (-4.35 percent).

Those two years bookended what economists call Brazil's "lost decade," when GDP grew just 1.67 percent on average across 10 years.

With last year's contraction, Brazil's economy grew even less for the decade from 2011 to 2020: an average of 0.3 percent.

"The Bolsonaro government escaped posting the worst GDP contraction in Brazilian history," wrote economics columnist Miriam Leitao in newspaper O Globo.

An empty street in a commercial area of Brasilia, the Brazilian capital, during a Covid lockdown
An empty street in a commercial area of Brasilia, the Brazilian capital, during a Covid lockdown AFP / EVARISTO SA

"However, even inside the government, there is acknowledgment that looking in the rear-view mirror provides little comfort, because 2021 is off to a much worse start than expected. The worsening of the pandemic is very unpredictable."

Brazil has reported more lives lost to Covid-19 than any country except the United States: more than 257,000.

Bolsonaro faces scathing criticism for downplaying the pandemic, flouting expert advice on containing it and failing to secure enough vaccines for the sprawling country's 212 million people.

Against that backdrop, the disease is now killing more people in Brazil than at any point in the pandemic: an average of 1,262 per day last week.

That has led economists to revise down their 2021 growth forecasts for Brazil.

Analysts polled by the central bank are currently predicting growth of 3.29 percent this year, down from 3.5 percent a month ago.

Brazil's national statistics institute, IBGE, said the only sector of the economy that expanded in 2020 was agriculture, which grew by two percent -- fueled by exports, especially to China.

"The strengthening of the dollar against the Brazilian real boosted agricultural exports, which helped a lot to avoid a bigger contraction," economist Jefferson Laatus told AFP.

Pandemic emergency payments to nearly one-third of the population also helped spur a recovery. However, the government phased them out at the end of the year, saying they were too expensive.

But Brazil fared better in 2020 than some other big economies, including Britain (-9.9 percent), the Eurozone (-6.8 percent) and regional rivals Mexico (-8.5 percent), Argentina (-10 percent) and Colombia (-6.8 percent).