Iranian protesters storm British embassy
Iranian protesters shout slogans and tear down the Union Jack at the British embassy in Tehran November 29, 2011. (REUTERS)

Iran planned to attack U.S. military bases on German soil in the event of a strike by the Esdt against the Islamic Republic's suspected nuclear bomb installations , Bild newspaper reported.

Prosecutors are investigating whether a German businessman had "conspiratorial contacts" with the Iranian embassy in Berlin. The alleged spying activity would have had sabotage purposes, the newspaper said.

"It is correct that a prosecutor's investigation has been opened about this matter in the newspaper," Prosecutor-general Harald Range was quoted by Haaretz newspaper saying during a news conference. "We are investigating, but at the same time we can rule out that there is any immediate danger," added Joerg Ziercke, chief of the federal police service.

Germany is home to many U.S. military facilities, including the Ramstein and Spangdahlem air bases.

The U.S. Embassy and U.S. military say they are aware of the report but it's against policy to comment on security measures.

Following an attack by Iranian protesters on the UK embassy in Tehran, German foreign minister Guido Westerwelle pulled the country's ambassador out of Iran.

The British Foreign Secretary William Hague announced the immediate closure of the Iranian embassy in London Wednesday and said staff had 48 hours in which to leave the country.

"If any country makes it impossible for us to operate on their soil they cannot expect to have a functioning embassy here," he said in a statement to MPS.

Hague also accused the Iranian regime of giving "some degree of consent" to Tuesday's protests, when demonstrators stormed the British embassy in Tehran and burned the Union Jack and looted diplomatic documents.