Wheat prices spiked, reaching a three-year high, and then shot back down after Ukraine sowed confusion in the market with conflicting statements on possible export limits.

Ukraine, the world's fifth-largest exporter, first issued a statement on Facebook saying it plans to limit shipments of milling wheat after a drought wrecked European crops. The ministry later sought to clarify its position, explaining that it's not discussing "strict limits" and will discuss projected shipment volumes with traders, Bloomberg wrote.

Futures rallied as much as 6.2 percent in Chicago and 5.3 percent in Paris. Prices later gave back most of the gain, with Chicago wheat trading up 0.6 percent as of 1:18 p.m. local time.

The Agriculture Ministry plans to sign a memorandum with traders setting limits for the 2018-19 season. The nation tends to enforce its wheat export limits informally, pressuring grain traders to ship certain volumes, rather than formally issuing a legal document. The effect, however, has been roughly the same, with Ukrainian grain sales capped.

"The worse wheat quality of this harvest may make the agriculture ministry pay more attention and follow strictly the size of milling wheat export set in the memo," said Sergey Feofilov, general director of UkrAgroConsult in Kyiv.

Read alsoUkraine expects record maize harvest, rising sales to China

Ukraine's move brings back memories of 2010-11 export restrictions imposed by the country and Russia after a heatwave and drought ruined crops. That sent global grain prices sharply higher.

Smaller crops in major shippers are boosting the attractiveness of Ukrainian grain, the ministry said. Extreme heat and dryness means output in the European Union will be the second lowest in a decade and production in Russia will fall for the first time in six years.

"We have seen this from Ukraine before," Matt Ammermann, a commodity risk manager at INTL FCStone Inc., said before the ministry's clarification. "The market may panic, fearing the same from Russia."

Russia's Agriculture Ministry said it has no plans to limit wheat exports.

Ukraine's milling-wheat supplies total about 11 million metric tonnes, with domestic demand pegged at about 5 million tonnes, according to the Agriculture Ministry.

Wheat prices are important for emerging markets including Egypt and Indonesia that rely heavily on imports. The world saw food riots in as many as 60 nations in Africa, Asia and the Middle East during the 2007-08 and 2010-11 food price spikes.

Still, global grain stockpiles remain high, said Abdolreza Abbassian, a senior economist at the United Nations' Food & Agriculture Organization.

"It's still very much a wheat situation, but we have to watch the corn situation quite carefully, especially in the U.S.," Abbassian said. "We could have quite a dramatic turn for worse, if in the coming weeks we get some strange weather hitting corn markets."