China’s economy is growing again after its worst three-month period in decades — a sign that could bode well for the global post-coronavirus recovery.

The world’s second-largest economy grew 3.2% in the April-to-June period compared a year ago, according to government statistics released on Thursday. That’s better than the 2.5% growth that analysts polled by Refinitiv were expecting.

It also means that China averted recession. In the first quarter, the $14 trillion economy shrank 6.8%, the worst plunge for a single quarter on record since China started publishing those figures in 1992. That was also the first time China reported an economic contraction since 1976.

Growth this quarter would confirm that the “post-virus recovery is underway in China, at least one to two quarters ahead of the rest of the world,” analysts at ANZ Research wrote in a report published before the GDP figures were announced.

The rebound had been widely expected by analysts. China — the early epicenter of the outbreak and the first in the world to impose draconian measures to quell the virus — was also the first major economy to reopen.

The early return to growth for China could foreshadow good news for the rest of the world.

The International Monetary Fund said in June that the global economy could contract 4.9% in 2020, lower than its April forecast. The IMF at the time projected the recovery to happen more gradually than previously expected.

But “the downturn could be less severe than forecast if economic normalization proceeds faster than currently expected in areas that have reopened,” the organization said. It projected that China’s economy will grow 1% this year, better than contractions expected in the United States and Europe.