Wheat prices in both the United States and Europe retreated on Friday but held just below two-year highs as markets reacted to the sudden imposition of a ban on grain exports from drought-hit Russia.

Prime Minister Vladimir Putin moved on Thursday to halt grain and flour exports to head off inflation following Russia's worst drought in 130 years, and the railroad monopoly said Friday it would stop loading grain for export from Saturday.

The introduction of the export ban from August 15 to the end of the year may be revised depending on results of the harvest season, First Deputy Prime Minister Igor Shuvalov said on Friday.

Clouds of smoke from peat and forest fires sparked by ferociously high temperatures choked Moscow on Friday as Shuvalov made his comments.

U.S. wheat futures on the Chicago Board of Trade fell 5 percent on Friday after surging more than 20 percent earlier this week and nearly doubling since early July to $8.41 a bushel.

The rise has revived memories of the surge in prices in early 2008, when U.S. wheat rose above $13 a bushel, which helped to fuel food inflation and led to rioting in many countries across the world.

Analysts, however, downplayed the link, adding that world stocks have grown steeply during the last couple of years which saw the two biggest wheat crops in history.

Stocks are close to 50 percent higher today (than they were during the last price spike in early 2008). You had a completely different scenario then, said Barclays Capital analyst Sudakshina Unnikrishnan.

Shares in Danish brewer Carlsberg , which faces a sharp rise in input costs, lost 4.5 percent, while food companies such as Nestle and Danone also saw their shares decline in value.

Shares of Flowers Foods , one of the largest U.S. food makers, were down 2 percent at $23.05 and shares of General Mills were down almost 1 percent at $33.50. but shares of other U.S. food companies, including Kraft Foods , which reported better-than-expected quarterly earnings

on Thursday afternoon, rose.

Persistent high prices could, however, drive fear of food inflation in key buyers such as Indonesia and the Philippines, analysts said.

If prices remain elevated for a sustained period, then the probability of upward adjustment in retail price of wheat and its derivatives goes up, Barclays Capital said in a report.

However, food prices tend to be politically sensitive, so we can expect some action from Asian governments.

Top consumers China and India are largely insulated from rising prices by sufficient wheat reserves.

Russia had been the world's third largest wheat exporter last year but is set to slide down the table this season with the worst drought since records began devastating crops.

Effectively, a big chunk of the global market is off-line -- there's going to be something like 5 million tonnes that aren't going to be available for export, said Matthew Kaleel, a commodities specialist at fund manager H3 Global in Sydney.

FORCE MAJEURE?

Trading companies that have sold Russian wheat to millers in Asia are considering declaring force majeure on supply contracts that could involve up to 1 million tonnes of wheat.

Force majeure clauses in supply contracts free firms from their obligations without penalty due to events beyond their control. They are often used in response to natural disasters.

If the contract says Russian wheat, it is straight away force majeure, said one trader with an international trading company in Singapore. We haven't heard but it will happen, even my company will do it.

Two suppliers scrapped deals to ship 65,000 tonnes of Black Sea wheat to Bangladesh, while in the Philippines a leading importer of feed wheat from the Black Sea, buyers were waiting to hear from suppliers.

Those with supply contracts are a bit nervous, even the buyer, said a grains trader in Manila.

The contracts are written with optional origins but it means the sellers will also have to pay through their noses and those noses will bleed really bad.

(Writing by Nigel Hunt in London; additional reporting by Augustine Anthony in Islamabad, Rosemarie Francisco in Manila, Chikako Mogi in Tokyo, Manolo Serapio Jr and Harry Suhartono in Singapore, Himangshu Watts in New Delhi and Fitri Wulandri in Jakarta; Brad Dorfman in Chicago; editing by Keiron Henderson and Lisa Shumaker)