BERLIN (Reuters) - Solid economic growth generated a record budget surplus for Germany in the first half of this year, stoking a debate within government about whether the country should use its spare revenue to cut taxes or increase spending.

The budget has been running a surplus since 2014, but that increased between January and June to 18.5 billion euros ($20.8 billion), or 1.2 percent of gross domestic product (GDP), the Federal Statistics Office said on Wednesday.

With tax revenues rising as the economy revives and debt costs pegged at unprecedentedly low levels, the gap was the highest since current records began with the country’s reunification in 1990.

The run of surpluses has allowed Finance Minister Wolfgang Schaeuble to increase state spending on roads, housing and digital infrastructure ahead of federal elections in 2017, while sticking to his goal of running a balanced budget.

But the International Monetary Fund and other euro zone governments have urged Berlin to do more and hike investment in education and infrastructure, as a means of helping to boost the currency bloc’s anaemic growth rate.

Germany’s economy grew 0.4 percent in the second quarter from the first, final data also released by Statistics Office on Wednesday showed.

That marked a slowdown from 0.7 percent in the first quarter but matched a preliminary reading and beat average rate of 0.3 percent in the euro zone as a whole.

Higher state spending and strong private consumption more than compensated for weaker investment in construction and equipment between April and June.

Exports - less of a growth driver than domestic demand in recent quarters - also bounced back after a weak performance at the start of the year, rising 1.2 percent.

Welding robots are pictured in a Golf VII production line at the plant of German carmaker Volkswagen in Wolfsburg, Germany May 20, 2016. REUTERS/Fabian Bimmer/File Photo

With imports slipping 0.1 percent, net foreign trade added 0.6 percentage points to overall economic growth.

The government expects domestic demand to drive economic growth of 1.7 percent this year, which would be on a par with 2015 when the economy grew by its fastest rate in four years.

ACHILLES’ HEEL

Nordea Bank economist Holger Sandte said Germany’s economic prospects were decent. While higher energy prices were likely to dampen private consumption in coming months, the large surplus “creates room ...to further increase investment by the state,” he said.

Wednesday’s data appeared to add weight to that argument.

While state spending and private consumption contributed 0.1 percentage points each to GDP, investment in plant and equipment fell more than 2 percent, subtracting 0.4 percentage points.

“The economy’s Achilles’ heel ... remains the lack of new investment,” ING Bank economist Carsten Brzeski said. “To kick-start investment in an ageing economy, some government support is needed.”

Chancellor Angela Merkel’s government remains at odds over what to do with the extra money.

The Social Democrats, junior partner in the ruling coalition, advocate more investment on education, housing and social integration, while Merkel’s conservatives want to slash income taxes for families.

“We must have the courage to give citizens real tax relief and reward the working people,” said Hans Michelbach, budget expert in the conservative CDU/CSU parliamentary group.

A Finance Ministry spokesman said it was too early to speculate or draw conclusions on the basis of the first six months’ data.

“We’ll have the final figures only at the end of the year. We’ll have to wait and see how things develop,” he added.

A Economy Ministry spokeswoman said the solid figures created room for investment in important areas such as digital infrastructure.