Image copyright EPA

Germany, Europe's biggest economy, could be heading for a recession.

Data from the German statistics office on Wednesday showed the economy shrank by 0.1% between April and June.

That takes the annual growth rate down to 0.4%. Germany narrowly avoided a recession last year.

But this time, there are predictions the economy will continue to contract for another three-month period.

The main driver of the economic weakness appears to be rising global trade tensions.

Marcel Fratzscher, the president of the research institute DIW Berlin, told the BBC that he believes Germany's first recession since 2013 is probably already under way.

"Most likely we will see another quarter of negative growth, and that's by definition a technical recession," he says.

He forecast the economy to shrink by 0.1% between July and September.

"It's very mild, but also at the same time, not a very strong performance," he said.

Exports slowing

Germany has traditionally relied on selling its manufactured products, such as cars, abroad.

That is a strength in good times, but appears to be a drag during the current trade tensions.

Data last week suggested that momentum in Germany's exports slowed in the first half of the year and reversed in June.

Other figures showed there had been a 1.5% fall in industrial output in May.

Image copyright EPA Image caption Germany is sending fewer cars abroad

"Industrial production is suffering from a severe setback of less global demand and increasing international trade problems," says Klaus Deutsch, the head of economic and industrial policy at the BDI, a business lobby organisation with one million members.

It predicts a recession may not happen this year, but would be hard to avoid next year if the current global turmoil continues.

Companies that supply Germany's carmakers, including Continental and Bosch, have warned about the impact of the worldwide slowdown on sales of cars.

"Most companies don't yet have to lay off workers or make drastic changes, but the mood has been softening strongly, and if things continue deteriorating, many companies will have to cut back production, perhaps move to temporary work schemes and reduce output even further," Mr Deutsch told the BBC.

Trump tariffs

The current situation has the potential to get much worse for German carmakers.

The US has threatened to impose extra tariffs on European-made cars, something that would hit the likes of BMW and Mercedes-Benz particularly hard.

US President Donald Trump recently joked about the potential for tariffs at a media event at the White House.

But many in Germany don't see the funny side, particularly as US national security has been cited as part of the justification for any new border taxes.

Chancellor Angela Merkel has said the threat to designate European carmakers as a security threat came as "a bit of a shock".

But her government believes the German economy will grow slightly this year, and does not think further stimulus is necessary.

And economy Minister Peter Altmaier had said the country was not yet in a recession and could avoid one if it took the right measures.

Image copyright Getty Images

Some Germany-based economists have said they expect the country to escape a recession this year, pointing to the near-record low unemployment rate and strength of domestic-focused businesses.

But with a potential recession looming, the government has been called on to spend its way back to growth.

The German government had a fiscal surplus of €58bn (£53.6bn) in 2018, so it has plenty of cash to spend, should it choose.

"It makes sense for the government to spend more," says DIW Berlin's Mr Fratzscher.

"It needs to act now in order to prevent a deeper recession or protracted slowdown in the economy, rather than wait for that to happen," he says.

The BDI business lobby organisation wants new tax incentives and investments in climate change mitigation measures and new digital technologies.

On Tuesday, Chancellor Merkel said she did not see any need for a fiscal stimulus package to counter the effects of a slowing economy, but said Berlin would continue to pursue high levels of public investment.