ISTANBUL/KYIV: Russia and Ukraine signed a landmark deal on Friday to reopen Ukrainian Black Sea ports for grain exports, raising hopes that an international food crisis aggravated by the Russian invasion can be eased. The accord crowned two months of talks brokered by the United Nations and Turkey aimed at what UN Secretary General Antonio Guterres called a "package" that would both restore Ukrainian grain exports while easing Russian grain and fertilizer shipments despite tough Western sanctions on Moscow. Guterres said the accord opens the way to significant volumes of commercial food exports from three key Ukrainian ports - Odesa, Chernomorsk and Yuzhny, and the UN would set up a coordination centre to monitor implementation of the deal. "Today, there is a beacon on the Black Sea. A beacon of hope..., possibility...and relief in a world that needs it more than ever," Guterres told the gathering. But fighting raged on unabated in Ukraine's east and, underlining deep-seated enmity and mistrust driving the worst conflict in Europe since World War Two, Russian and Ukrainian representatives declined to sit at the same table at the ceremony, and the display of the two countries' flags was adjusted so that they were no longer next to one other. "In case of provocations, (there will be) an immediate military response" by Ukraine, Kyiv presidential adviser Mykhailo Podolyak tweeted before the ceremony. Russia and Ukraine, both among the world's top exporters of food, sent their defence and infrastructure ministers respectively to Istanbul for the signing ceremony, also attended by Guterres and Turkish President Tayyip Erdogan. A blockade of Ukrainian ports by Russia's Black Sea fleet, trapping tens of millions of tonnes of grain in silos and stranding many ships, has worsened global supply chain bottlenecks and, along with sweeping Western sanctions, stoked galloping inflation in food and energy prices around the world. Moscow has denied responsibility for the worsening food crisis, blaming instead Western sanctions for slowing its own food and fertilizer exports and Ukraine for mining the approaches to its Black Sea ports. Senior UN officials, briefing reporters on Friday, said the deal was expected to be fully operational in a few weeks. Safe passage into and out of the ports would be guaranteed in what one official called a "de facto ceasefire" for the ships and facilities covered, they said, although the word "ceasefire" was not in the agreement text. Though Ukraine has mined nearby offshore areas as part of its defences against Russia's five-month-old invasion, Ukrainian pilots would guide ships along safe channels in its territorial waters, they said. Monitored by a Joint Coordination Center based in Istanbul, the ships would then transit the Black Sea to Turkey's Bosphorus strait and proceed to world markets, UN officials said. The deal will be valid for 120 days but renewable and would not be expected to be stopped any time soon. "The fact that two parties at war - and still very much at war - have been able to negotiate an agreement of this kind...I think that's unprecedented," one UN official said. Another said a separate pact signed on Friday would smooth Russian food and fertilizer exports and that the United Nations welcomed US and European Union clarifications that their sanctions would not apply to such shipments. To address Russian concerns about ships smuggling weapons to Ukraine, all returning ships will be inspected at a Turkish port by representatives of all parties and overseen by the JCC. The overall objective is to help avert famine among tens of millions of people in poorer nations by injecting more wheat, sunflower oil, fertilizer and other products into world markets including for humanitarian needs, partly at lower prices. The United States welcomed the deal and said it was focusing on holding Russia accountable for implementing it. Turkey, a NATO member that has good relations with Russia and Ukraine alike, controls the straits leading into the Black Sea and has acted as a mediator on the grain issue. Ukrainian President Volodomyr Zelenskiy met senior commanders on Thursday and said Kyiv's forces, now increasingly armed with precision, longer-range Western weaponry, had strong potential to turn the tide on the battlefield. The United States believes Russia's military is sustaining hundreds of casualties a day, including thousands of officers up to general rank in total, in the course of the war, a senior US defense official said on Friday. The official said Washington also believed that Ukraine had destroyed more than 100 "high-value" Russian targets in Ukraine, including command posts, ammo depots and air-defence sites. There have been no major breakthroughs on front lines since Russian forces seized the last two Ukrainian-held cities in eastern Luhansk province in late June and early July. Russian forces are now focused on capturing all of neighbouring Donetsk province on behalf of separatist proxies who have declared two breakaway mini-states covering the wider industrialised Donbas region. In its morning update, Ukraine's general staff said Russian forces backed by heavy artillery kept trying to advance toward the cities of Kramatorsk and Bakhmut and the Vuhlehirska thermal power plant in Donetsk, but made no notable progress. Kyiv hopes that its gradually increasing supply of Western arms, such as US High Mobility Artillery Rocket System (HIMARS), will allow it to counter-attack and recapture lost eastern and southern territories. Russia's defence ministry said on Friday its forces had destroyed four HIMARS systems between July 5-20. Kyiv denied the claims, calling them "fakes" meant to sap Western support for Ukraine. Reuters could not verify the assertions. Russia says it is waging a "special military operation" to demilitarise its neighbour and rid it of dangerous nationalists. Kyiv and the West say Russia is mounting an imperialist campaign to reconquer a pro-Western neighbour that broke free of Moscow's rule when the Soviet Union collapsed in 1991.