With France and Italy, the euro zone's second and third biggest economies, each forecast to shrink by 9% in 2020, Thursday's preliminary data underlines how the crisis is increasing discrepancies within the 19-country currency bloc.

The contraction was smaller than a Reuters poll forecast of -5.1% and less severe than the record -5.7% suffered in 2009, during the financial crisis. Adjusted for calendar effects, gross domestic product declined by 5.3%, the statistics office said.

"It was actually a year of disaster, but judging by what had been feared in the course of the year, one could say we got off lightly," LBBW analyst Uwe Burkert said.

The statistics office said growth probably stagnated in the fourth quarter but carried positive momentum into 2021, suggesting Germany has so far managed to cope relatively well with a second wave of COVID-19 infections.

Chancellor Angela Merkel's coalition government has since March unleashed an array of measures to help companies and consumers in Europe's biggest economy through the pandemic.

The debt-financed programmes include liquidity aid for struggling firms, job protection schemes for employees, tax cuts and cash handouts to boost domestic demand and long-term investments in green technologies and public infrastructure.

Economy Minister Peter Altmaier said Berlin will do everything it can to ensure 2021 becomes the year of recovery but cautioned that overall growth could be somewhat smaller than previously projected.

The government estimated 2021 GDP growth of 4.4% in an October forecast due to be updated later this month. The Ifo economic institute expects 4.2% growth this year.

BORROW AND SPEND

The fiscal splurge was possible because parliament suspended constitutional limits on budget deficits, sending government borrowing to record highs.

Finance Minister Olaf Scholz, who is running as the Social Democrat (SPD) candidate for chancellor at elections in September, is expected to rack up a total of more than 300 billion euros in new debt in 2020 and 2021.

The public sector, including federal states, municipalities and social security systems, ran a budget deficit of 158.2 billion euros ($192.31 billion) or 4.8% of GDP, the office said.

That marked a severe deterioration of public finances following a surplus of 52.5 billion euros or 1.5% in 2019.

Private consumption tumbled 6% in 2020 on the year although disposable income edged up on average thanks to state aid and the Kurzarbeit short-time work scheme, the office said.

Lockdown measures to contain the coronavirus meant many consumers were not able to spend their money, so the net savings rate ballooned to a record high of 16.3%.

This pent-up spending power could boost household spending from the second quarter of 2021 if lockdown measures are gradually lifted in spring, the statistics office said.

Exports plunged nearly 10% while imports dropped 8.6%, suggesting that Germany's traditionally large trade surplus narrowed in the course of the pandemic.

The only bright spots came from government spending, which pushed up state consumption by 3.4%, and construction, where investment in building rose 1.5%, the preliminary data showed.

($1 = 0.8226 euros)

(Reporting by Michael Nienaber and Thomas Seythal; Editing by Maria Sheahan and Catherine Evans)

By Michael Nienaber and Thomas Seythal