South Africa's economy recorded its first annual contraction in 11 years in 2020 due to the coronavirus pandemic but rebounded in the last two quarters, official data showed Tuesday.

The country's gross domestic product (GDP) shrank by 7.0 percent in 2020 compared with a 0.2-percent expansion a year earlier, statistics agency StatSA said in a statement.

The drop was "primarily led by decreases in manufacturing, trade, catering and accommodation," it said.

It was the first annual contraction since 2009, when GDP fell by 1.5 percent.

But the economy -- already in recession when it was hit by the virus -- showed signs of resilience despite Covid-19 restrictions, and grew by 1.5 percent in the final quarter of 2020, with annualised growth of 6.3 percent.

The GDP growth between October and December was driven mainly by a boom in the manufacturing and trade sectors, said StatSA.

That extended a recovery that began in the third quarter -- when South Africa posted quarter-on-quarter growth of 13.5 percent -- after the pandemic handed Africa's second-largest economy a record slump.

In annualised terms, the statistics agency's preferred measure, third-quarter growth reached 66.1 percent, after falling back by 51.7 percent between April and June.

It was the first recession in South Africa since 2008, when GDP fell by 3.2 percent
It was the first recession in South Africa since 2008, when GDP fell by 3.2 percent AFP / Guillem Sartorio

The economy picked up pace in the third quarter when containment measures were loosened as infection numbers fell.

A resurgence of infection fuelled by a more contagious variant of the coronavirus meant a reimposing of some restrictions but industries put up a brave face.

Sectors such as the hospitality and tourism industries were hardest hit as a night-time curfew and alcohol ban forced restaurants to close early.

The government imposed a strict lockdown in late March to stymie the rising virus cases, but it also stifled the economic outlook.

Analysts forecast the country will perform better in 2021.

"High frequency data suggests that a strong recovery is underway this year," said South Africa's North-West University business professor Raymond Parsons, suggesting growth could rebound by as much as three percent in 2021.

Economic recovery is expected to pick up and business operations normalise as vaccine distributions gather momentum.

"The gradual rollout of the vaccination should ease anxiety and prop up confidence," said Nedbank in a note.

Africa's most industrialised nation has counted more than 1.5 million cases of Covid-19 of which slightly over 50,000 have been fatal, representing nearly half of the total deaths on the continent.