KYIV, UKRAINE -- Russia agreed Wednesday to rejoin a wartime agreement that allows Ukrainian grain and other commodities to be shipped to world markets. The UN鈥檚 refugee chief, meanwhile, put the number of Ukrainians driven from their homes since the Russian invasion eight months ago at around 14 million.

It is 鈥渢he fastest, largest displacement witnessed in decades,鈥 said Filippo Grandi, who heads the United Nations High Commissioner for Refugees.

In announcing that Russia would rejoin the grain pact, President Vladimir Putin said Moscow had received assurances that Ukraine would not use the humanitarian corridors to attack Russian forces. He warned that Russia reserves the right to withdraw again if Kyiv breaks its word.

Putin praised Turkey鈥檚 mediation efforts to get the deal back on track, as well as Turkish President Recep Tayyip Erdogan鈥檚 鈥渘eutrality in the conflict as a whole鈥 and his efforts at 鈥渆nsuring the interest of the poorest countries.鈥

Ukrainian President Volodymyr Zelenskyy said he also thanked Erdogan on Wednesday, 鈥渇or his active participation in maintaining the grain agreement, and his unwavering support for the sovereignty and territorial integrity of Ukraine.鈥

Russia had suspended its participation in the grain deal over the weekend, citing an alleged drone attack against its Black Sea fleet in Crimea.

Ukraine did not claim responsibility for an attack, and Zelenskyy said Wednesday that Moscow鈥檚 return to the agreement showed 鈥淩ussian blackmail did not lead to anything.鈥

Erdogan said shipments would resume Wednesday, prioritizing those to African nations, including Somalia, Djibouti and Sudan. That's in line with Russia鈥檚 concerns that much of the exported grain had ended up in richer nations, since Moscow and Kyiv made separate agreements with Turkey and the UN in July.

UN humanitarian chief Martin Griffiths said Monday that 23 per cent of the cargo exported from Ukraine under the grain deal went to lower- or lower-middle-income countries, which also received 49 per cent of all wheat shipments.

UN Secretary-General Antonio Guterres hailed Russia鈥檚 announcement, and a spokesman said Guterres 鈥渞emains committed to removing the remaining obstacles to the exports of Russian food and fertilizer.鈥

Ukraine and Russia are major global exporters of wheat, barley, sunflower oil and other food to developing countries. A loss of those supplies before the grain deal had pushed up global food prices, led to soaring energy costs, and helped throw tens of millions into poverty.

The July agreement brought down global food prices about 15 per cent from their peak in March, according to the UN After the announcement Wednesday that Russia would rejoin the deal, wheat futures prices erased increases seen Monday, dropping more than 6 per cent in Chicago.

Meanwhile, in Kyiv, the local power-grid operator said electricity had been restored after a wave of Russian drone and artillery strikes had targeted energy infrastructure. About 300,000 households reportedly got their power back, but local authorities called for controlled blackouts to reduce strain on the system.

Grandi, the UN refugee official, noted that Ukrainians are about to face 鈥渙ne of the world鈥檚 harshest winters in extremely difficult circumstances.鈥

He said those include the continuing destruction of civilian infrastructure, which is 鈥渜uickly making the humanitarian response look like a drop in the ocean of needs.鈥

Grandi said the 14 million Ukrainian refugees had increased the overall number of displaced people worldwide to more than 103 million.

Power outages also were reported in the southern cities of Nikopol and Chervonohryhorivka after 鈥渁 large-scale drone attack," Dnipropetrovsk Gov. Valentyn Reznichenko said. The two cities lie across the Dnieper River from the huge Zaporizhzhia Nuclear Power Plant.

Russia and Ukraine have traded blame for months for shelling at and around the plant that the UN's nuclear watchdog warned could cause a radiation emergency. In a development easing some fears, Ukraine鈥檚 state nuclear company Energoatom, said the plant has been reconnected to the country鈥檚 power grid after shelling forced it to rely on generators to cool spent nuclear fuel.

The plant is held by Russian forces, but Ukrainian staff continues to run it.

The company also said Russian soldiers have cordoned off the plant鈥檚 spent nuclear-fuel storage facility and began unspecified construction there. 鈥淭hey don鈥檛 let anyone in, they don鈥檛 report anything,鈥 the company said.

Russian shelling continued in southern and eastern Ukraine, causing at least four civilian deaths between Tuesday and Wednesday, according to Zelenskyy's office.

鈥淭he epicentre of the fighting鈥 was around the city of Bakhmut, neighbouring Soledar and the wider Donetsk region, Ukraine鈥檚 Deputy Defence Minister Hanna Malya told Ukrainian TV. She said Ukrainian defenders around Bakhmut were facing a 鈥渧ery difficult鈥 task.

鈥淏ut the main thing is that Ukraine will not give up a single inch of land,鈥 she said.

In southern Ukraine, Russian-installed authorities in the occupied Kherson region announced they were temporarily halting traffic across the wide Dnieper River, citing 鈥渋ncreased military danger鈥 as Kyiv鈥檚 forces edged closer to the region鈥檚 capital, the city of Kherson.

The move would also prevent civilians from crossing back into Ukrainian-held territory.

The Moscow-backed authorities have said they are relocating tens of thousands of civilians further into Russian-held territory in anticipation of the Ukrainian counterattack.

The province was overrun by Russian forces early in the war, and both sides have been girding for a major battle over it.

In another development, Belarus and Russia began preparations for large-scale joint military exercises. Belarusian Defence Minister Viktor Khrenin didn鈥檛 specify the dates for the exercises, dubbed Union Shield-2023, or the number of troops that would take part.

Russia has previously used Belarus, an economically dependent ally, as a springboard to send troops and missiles into Ukraine. Kyiv fears that the Belarusian army will be directly drawn into the war, striking from the north where the countries share a 1,080-kilometre (671-mile) border.

On a visit to Kyiv on Wednesday, Spain鈥檚 Foreign Minister José Albares pledged a new military aid package to help Ukraine鈥檚 air defences. Cambodia, meanwhile, agreed to send deminers to help train Ukrainians in clearing land mines.

___

Fraser reported from Ankara, Turkey. Courtney Bonnell in London contributed reporting.