CHICAGO, July 20 (Reuters) - Chicago Board of Trade wheat futures dipped on Thursday but remained near recent peaks as a third night of Russian attacks on Ukrainian ports renewed concerns about disruptions to exports needed to meet world demand and stave off rising food prices.

Wheat futures had risen in four of the previous five sessions and the benchmark Chicago Board of Trade contract jumped 8.5% on Wednesday, its biggest daily rally since right after Russia's invasion of Ukraine last year on the prospect of grain flows being cut off from two key global suppliers.

Ukraine's Defense Ministry said on Thursday it would consider all ships traveling to Russian ports and Ukrainian ports on the Black Sea that are occupied by Russia as potential carriers of military cargo starting on Friday. That announcement was made a day after the Kremlin said that ships heading to Ukraine's Black Sea ports could be considered military targets.

"That also raised the risk of retaliation in a way that might threaten the willingness of shippers to haul Russian grain through the Black Sea," Arlan Suderman, chief commodities economist at StoneX, said in a client note. "The implications are massive for world wheat supplies."

Concerns about tight stocks lent support to K.C. hard red winter wheat and MGEX spring wheat contracts, which track the high-protein crops that are in short supply.

Corn and soybean futures were mostly weaker on profit-taking setbacks but declines were kept in check by outlooks for hot weather in key U.S. Midwest growing areas.

CBOT September soft red winter wheat futures settled down 3/4 cent at $7.27 a bushel.

"Russia's overnight attack on infrastructures at the port of Odesa will have served to remind participants and observers as to the risks involved in maintaining Black Sea trade flows without a guarantee of safety," BMI Research, a unit of Fitch Group, said in a note.

CBOT November soybeans were 4 cents lower at $14.04-3/4 a bushel and CBOT December corn was off 6-3/4 cents at $5.46-1/4 a bushel.

(Additional reporting by Naveen Thukral in Singapore and Sybille de La Hamaide in Paris; Editing by Sherry Jacob-Phillips, Rashmi Aich, Mike Harrison, Will Dunham and Paul Simao)