By Vitalii Hnidyi and Jonathan Spicer
KHARKIV, Ukraine/ISTANBUL (Reuters) -Russia and Ukraine will sign a deal on Friday to reopen Ukraine's Black Sea ports, Turkey said, a potential breakthrough that could ease the threat of hunger facing millions around the world as a consequence of Russia's invasion.
Ukraine and Russia are both among the world's biggest exporters of food, and Ukraine's ports, including the major hub of Odesa, have been blockaded by Russia's Black Sea fleet.
The halt to grain shipments during the five-month war has caused prices to rise dramatically around the world, and reopening Ukraine's ports could potentially avert famine.
Although Russia's ports have not been shut, Moscow had complained that its shipments were hurt by Western sanctions. The United States and the European Union have both adjusted their sanctions recently to spell out more clearly exceptions for Russian food and fertiliser exports.
Turkey, a NATO member with good relations with both warring countries, controls the straits leading into the Black Sea and has acted as a mediator on the issue. U.N. Secretary-General Antonio Guterres, who would potentially sign any agreement, was headed there.
Ankara said the parties would put in writing an accord they had agreed in principle at talks last week in Istanbul.
Full details of the agreement were not immediately released. It was due to be signed on Friday at the Dolmabahce Palace offices at 1330 GMT, President Tayyip Erdogan's office said.
There was no immediate confirmation from Moscow.
The Kyiv government did not confirm a deal was set. The foreign ministry said late on Thursday that another U.N.-led round of talks to unblock Ukrainian grain exports would take place in Turkey on Friday.
"In summary, a document may be signed which will bind the sides to (ensure) safe functioning of export routes in the Black Sea," foreign ministry spokesperson Oleg Nikolenko said.
The U.S. State Department said it welcomed the announcement and would hold Russia to account for implementing the agreement.
MINED PORT WATERS
Before last week's talks, diplomats had said details of the plan included Ukrainian vessels guiding grain ships through mined port waters. Turkey would oversee the inspection of ships to allay Russian concerns they might bring weapons to Ukraine.
The United Nations and Turkey have been working for two months to broker what Guterres called a "package" deal - to resume Ukraine's Black Sea grain exports and facilitate Russian grain and fertilizer shipments.
Ukraine could potentially restart exports quickly, Ukraine's Deputy Agriculture Minister Taras Vysotskiy said on Thursday.
"The majority of the infrastructure of ports of wider Odesa - there are three of them - remains, so it is a question of several weeks in the event there are proper security guarantees," he told Ukrainian television.
PIPELINE REOPENED
The Ukraine war has caused inflation around the world both because of the global grain shortage and threats to energy supplies.
Russia on Thursday reopened its biggest gas pipeline to Germany at less than half normal capacity after a maintenance shutdown, raising worries of European energy shortages to come.
The resumption of gas flows via the Nord Stream 1 pipeline to Germany ended a nerve-jangling 10 days for Europe in which politicians expressed concern Russia might keep it shut altogether after closing it for repairs.
But with the flows still reduced, Germany's Economy Minister Robert Habeck accused Russia of blackmailing Europe over energy. The Kremlin denied that and blamed Europe for causing disruption with sanctions that complicated the pipeline's maintenance.
"(President Vladimir) Putin's goal is to unsettle, drive up prices, divide society and to weaken support for Ukraine," Habeck said. "We don't bow to it but counteract this with concentrated and consistent action. We take precautions so that we can get through the winter."
BLOOD AND FIRE
Inside Ukraine, Kyiv has accused the Russians of stepping up strikes on cities in recent weeks in a deliberate attempt to terrorise its population. Moscow denies deliberately attacking civilians and says all its targets are military.
In Kharkiv, Ukraine's second-biggest city, shells struck a crowded market. A woman sobbed over the body of her husband lying near a stall while a couple tried to comfort her. Other residents stood around the bloodstained marketplace looking stunned.
"We saw people drenched in blood. We saw people on fire," local entrepreneur Khaibar Karimi said. "We helped with bringing the wounded to the subway. The smoke was very thick. There were many wounded on the street."
The regional prosecutor’s office said three people were killed and 23 wounded in shelling of two districts. The chief of Kharkiv national police, Volodymyr Tymoshko, said there were no military targets nearby.
The main frontlines have been largely frozen since Russian forces seized the last two Ukrainian-held cities in eastern Luhansk province in battles in late June and early July.
But Russia is shelling neighbouring Donetsk province in what Ukraine says is preparation for a potential new advance there. Russia aims to fully capture all of Donetsk and Luhansk on behalf of its separatist proxies.