Germany has come in for criticism from U.S. President Donald Trump's administration for its large trade surplus with the United States, while scepticism towards free trade is mounting in some poorer euro zone countries.

"A reduction of Germany's surplus would help reduce global imbalances, which clearly we are concerned about at the IMF," International Monetary Fund chief Christine Lagarde told a conference in Frankfurt.

"The rise of rampant protectionism or protectionism threats is certainly not unrelated to the accumulation of current account surpluses in some countries," she said.

Germany's current account surplus was the world's largest in 2017, data showed this week, and the government in Berlin is expected to post record fiscal surpluses this year and next.

The IMF and the European Commission have for years urged Germany to increase domestic spending and imports.

Lagarde told German broadcaster ARD in an interview broadcast later on Thursday that the IMF considered the current level of German surpluses "unjustified", and said greater German investments would help reduce the imbalances.

Speaking earlier at the same conference, Germany's central bank governor Jens Weidmann defended his country's record budget and current account surpluses.

Weidmann said Germany needed to build a fiscal buffer to help it withstand the effect of an ageing society and that it would be "futile" for Berlin to spend more in order to try to help its neighbours.

"Raising public spending in order to reduce Germany’s current account surplus would likely be a futile undertaking," the Bundesbank president said.

In the ARD interview, Lagarde said the IMF supported the European Central Bank's pursuit of a loose monetary policy as long as its inflation targets had not been met, but said that policy could not go on forever.

(Reporting by Francesco Canepa and Andrea Shalal; editing by Mark Heinrich)