US army personnel have been banned from travelling to Munich and Garmisch-Patenkirchen where the G7 will be held over fears they may be attacked by anti-globalisation protesters.
"The order affects all 30,000 members of the army in Europe from travelling to the indicated areas. Family members are also strongly requested to avoid these zones," a US Army spokesman told German newspaper Der Spiegel.
The travel restrictions were issued for Munich on 4 June, and Garmisch-Partenkirchen on 7 to 8 June, where the summit will be held in nearby Elmau Castle in the Bavarian Alps.
David Cameron, Angela Merkel and Barack Obama will be among the world leaders attending.
A Munich court has overturned an order from Garmisch-Patenkirchen authorities on anti-G7 protesters camping in the town, and must accommodate 1,000 protesters.
Soldiers stationed at the barracks in the town are advised to avoid wearing their uniforms to "avoid unnecessary confrontation", avoid "unnecessary stops" while in vehicles, and in addition "avoid speaking English so loudly that you draw attention to yourselves".
Of expected demonstrations, the spokesman warned: "There is a possibility that violence might be used... they're expecting thousands of protesters, including anti-globalisation activists and others."
In March, 100 people were injured, including 88 police officers and two firefighters, when protests against the opening of a new European Central Bank in Frankfurt turned violent.