Russia and Ukraine have signed a landmark deal 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 fertiliser shipments despite tough Western sanctions on Moscow.

Mr Guterres said the accord opens the way to significant volumes of commercial food exports from three key Ukrainian ports, Odesa, Chernomorsk and Yuzhny, and that 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," Mr Guterres said.

But fighting raged on unabated in Ukraine's east and, underlining deep-seated enmity and mistrust driving the worst conflict in Europe since WWII, 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, Mykhailo Podolyak tweeted.

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 Mr 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 rising 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.

We need your consent to load this rte-player contentWe use rte-player to manage extra content that can set cookies on your device and collect data about your activity. Please review their details and accept them to load the content.Manage Preferences

Senior UN officials, briefing reporters today, said the deal was expected to be fully operational in a few weeks.

President Michael D Higgins welcomed the UN-backed deal, saying that it provides a "glimmer of hope" in relation to the crucial issue of food security among countries at risk of starvation and malnutrition.

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.

Russian Defence Minister Segei Shoigu promised that Moscow would not take advantage of de-mined Ukrainian ports and said conditions were in place to unlock grain exports from Ukraine "in the next few days".

"We are talking not only about the beginning of the export of agricultural products from Ukrainian ports, but also work on agricultural products, fertiliser from Russian ports," he 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 today would smooth Russian food and fertiliser 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 US 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.

Russian Defence Minister Sergei Shoigu (L), UN Secretary General Antonio Guterres (C), Turkish President Recep Tayyip Erdogan (2R) and Turkish Defence Minister Hulusi Akar (R)

Turning the battlefield tide

Ukrainian President Volodomyr Zelensky 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 US 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 defence official said.

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, will allow it to counter-attack and recapture lost eastern and southern territories.

Russia's defence ministry said today that its forces had destroyed four HIMARS systems between 5-20 July. Kyiv denied the claims, calling them "fakes" meant to sap Western support for Ukraine. Reuters could not verify the assertions.

Thousands of people have been killed and cities and towns devastated by Russian bombardment, with some far from frontlines hit by missiles. Russia denies deliberately firing on civilians and said all its targets are military.

Russia said 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.

Russian and Ukraine are among the world's top exporters of food

Separately, the European Commission has given the go-ahead to the renewed suspension of crop rotation rules that require European farmers to leave 1.5 million hectares of arable land lying fallow.

A global grain shortage exacerbated by climate change and the Russian invasion of Ukraine had forced EU members to set aside normal crop rotation rules and maximise production.

"The impact of such a measure will depend on the choice made by member states and farmers, but it will maximise the EU's production capacity for cereals aimed for food products," the commission said.

The renewed suspension of the rules will have to be approved by member state governments, but national capitals had asked Brussels to draw up the measure so this is seen as a formality.

EU rules on rotating crops to preserve fertility and conserve environmental features keep around 1.5 million hectares out of production.

Additional reporting by AFP