The latest correction was all the more unexpected after an investor survey by the ZEW institute in mid-August showed a recovery from the huge Brexit slump in confidence in July.

Ifo's headline figure is produced from two figures representing companies' feelings on the current business environment and the outlook for the next six months.

The sub-index measuring current business fell to 112.8, two points below its July level.

Confidence in the future outlook also took a two-point blow, falling to 100.1 from 102.1 in July.

Manufacturers, retailers and wholesalers all reported falling confidence in August.

Chemical and electrical firms were among the gloomiest in industry, Ifo chief Fuest said, while food and beverage firms were the least positive among retailers.

But one bright spot was construction, where firms had a more optimistic view of the coming months even as their view of current business clouded over.

Germany's DAX stock market index of 30 leading firms had fallen 1.36 percent by 0900 GMT on Thursday as investors absorbed the news, with every single blue-chip firm's shares losing value.

"Today's Ifo suggests that German businesses have suddenly woken up to Brexit reality," economist Carsten Brzeski at ING Diba bank said, noting that the index often takes time to respond to global events.

While Germany's run of good economic news has so far been sustained by high government spending on refugees and strong appetites for consumption among households, investment remains weak, he went on.

"There is a risk that the Ifo will fall further," warned Stephen Brown of Capital Economics, noting that the boosts to German firms from low oil prices and a weakening euro are fading.

While confidence is stronger than it was in February, when fears of a slowdown in China sent ripples around the world, it still points to a slowdown in German economic growth in 2017, Brown said.

Germany's Bundesbank (central bank) predicted GDP growth of 1.7 percent for 2016 and 1.4 per cent for 2017 in a forecast released in early June - well before the Brexit referendum.