Russia and Ukraine have signed a landmark agreement while war rages on.
The warring nations have agreed to reopen Ukrainian Black Sea ports for grain exports, raising hopes that the world's crippling food crisis aggravated by the Russian invasion can be eased.
The agreement is the crown of two months of talks brokered by the United Nations and Turkey, with Turkey's President Tayyip Erdogan boldy declaring it a "turning point" in the war which aims to prevent billions from facing famine.
Meanwhile however, fighting and devastating destruction rages on in Ukraine's east with President Volodomyr Zelenskiy telling senior commanders that Kyiv's forces, now increasingly armed with precision, longer-range Western weaponry, had strong potential to turn the tide on the battlefield.
With deep-seated hostility 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 signing ceremony, and the display of the two countries' flags was adjusted so that they were no longer next to one other.
In a tweet before the event, Kyiv presidential adviser Mykhailo Podolyak said: "In case of provocations, (there will be) an immediate military response."
After two months of talks, UN Secretary General said a "package" had been agreed that would both restore Ukrainian grain exports while easing Russian grain and fertilizer shipments despite tough Western sanctions on Moscow.
A bouyant Erdogan claimed the deal will ease global food inflation and declared that "war will end at the negotiating table" after Turkey helped broker the deal between the two countries, which are among the world's top exporters of food.
It aims to restore Ukrainian grain exports while easing Russian grain and fertiliser shipments despite tough sanctions on Moscow.
Erdogan said the deal will be run by a joint coordination centre in Istanbul, Turkey, and called on all parties to end the conflict.
He added that war does not only affect parties involved but the whole of humanity.
"We are proud to be instrumental in an initiative that will play a major role in solving global food crisis that has been on the agenda for a long time,' the Turkish leader said.
"War will end at the negotiating table. This is a turning point," he added.
UN Secretary General António Guterres said the outcome opens the way to significant volumes of commercial food exports from three key Ukrainian ports including Odesa, Chernomorsk and Yuzhny.
It will also see the UN set up a coordination centre to monitor implementation of the deal.
Guterres said: "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."
Meanwhile, Ukraine and US allies believe the invaded nation can turn the tide of the war.
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 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 U.S. 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.
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.
The warring countries sent their defence and infrastructure ministers respectively to Istanbul for the signing ceremony for the landmark grain supplies deal. Guterres and Erdogan also attended.
Bottlenecks in the global supply chain have worsened after Ukrainian ports were blocked by Russia's Black Sea fleet.
Tens of millions of tonnes of grain were trapped in silos with many ships stranded.
Sweeping Western sanctions are also taking a toll with galloping inflation in food and energy prices around the world.
Moscow has denied responsibility for the worsening food crisis.
Instead it blames Western sanctions for slowing its own food and fertiliser exports and Ukraine for mining the approaches to its Black Sea ports.
Senior UN officials said on Friday that 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.
f
One UN official said: "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."
Another said a separate pact signed on Friday would smooth Russian food and fertiliser exports.
They added that the United Nations welcomed US and European Union clarifications that their sanctions would not apply to such shipments.