BERLIN — German factory orders surged in May, beating economists' expectations and ending a string of declines.

The Federal Statistical Office reported Thursday that industrial orders rose 2.6 percent in May over the previous month in Europe's largest economy when adjusted for seasonal and calendar effects.

The increase was driven by a 6.7 percent rise in orders from within the eurozone and 4.3 percent increase in domestic orders. The last time factory orders increased was in December 2017, and the succession of monthly declines had raised concerns that the German economy may be cooling.

Economists had predicted a 1.1 percent increase in May.

The Economy Ministry says industrial growth should continue in a gradual upward trend in the coming months.