For the past five years, Europe's biggest economy has consistently posted public budget surpluses. The latest figure is 2.7 percent of gross domestic product, suggesting Chancellor Angela Merkel's government could untie the purse strings and boost sluggish growth.
Destatis also confirmed that Germany's GDP declined by 0.1 percent in the second quarter while all signals point to further shrinking in the current quarter, spelling a technical recession.
The German economy, which is highly dependent on exports, is vulnerable to global trading tensions, especially strife between Washington and Beijing, and uncertainty about Britain's exit from the European Union at the end of October.
In seasonally adjusted figures, German exports fell by 1.3 percent from the previous quarter, while imports were down by 0.3 percent, Destatis said.