UN Secretary-General Antonio Guterres has said that he was gravely concerned by the situation at Europe's largest nuclear power station after it came under shelling at the front lines in Ukraine.

Russia, which captured the Zaporizhzhia nuclear plant soon after its 24 February invasion of Ukraine, said it could shut down the facility - a move Kyiv said would increase the risk of a nuclear catastrophe.

Mr Guterres, speaking to reporters after talks with Ukraine's President Volodymyr Zelensky in the western Ukrainian city of Lviv, said military equipment and personnel should be withdrawn from the plant.

"The facility must not be used as part of any military operation. Instead, agreement is urgently needed to re-establish Zaporizhzhia's purely civilian infrastructure and to ensure the safety of the area," he said.

Moscow had earlier rejected international calls for a demilitarised zone around the plant, which is still operated by Ukrainian engineers under Russian occupation, as "unacceptable".

The power station sits on the Russian-controlled south bank of a huge reservoir; Ukrainian forces hold the north bank. Recent days have seen several incidents of shelling at the plant, which both sides blame on each other.

Ukraine also accuses Russia of using the plant as a shield for its forces to launch strikes across the reservoir on Ukrainian-held cities, which Moscow denies.

Reuters cannot independently confirm the military situation there or responsibility for shelling.

Mr Zelensky said after meeting Mr Guterres that they had agreed parameters of a possible mission of the International Atomic Energy Agency to the plant.

Earlier, he had accused Russia of "nuclear blackmail".

"This deliberate terror on the part of the aggressor can have global catastrophic consequences for the whole world," Mr Zelensky wrote on the Telegram messaging app.

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

'Radiation disaster'

In Moscow, the defence ministry said Russia could shut the plant down if it came under further attack.

Ukrainian officials have accused Russia of planning to shut the plant to sever it from Ukraine's power grid and switch it over to Russia's - effectively stealing its output.

Ukrainian state nuclear energy company Energoatom said shutting down the plant would increase the risk of "a radiation disaster at the largest nuclear power plant in Europe".

Disconnecting the complex's generators from Ukraine's power system would prevent them being used to keep nuclear fuel cool in the event of a power outage at the plant, it said.

Shutting down a nuclear power plant is a complicated operation that requires halting nuclear chain reactions while protecting fuel from heating up and causing a meltdown.

"Should Russia take actions to force (the plant) off the Ukraine power system, that could threaten the operational safety of the station, in addition to escalating Ukraine's energy crisis into the winter," Mark Hibbs, senior fellow at the Nuclear Policy Program at the Carnegie Endowment for International Peace, told Reuters in an email.

Russia's defence ministry and Ukraine's main intelligence agency both accused the other side of planning some form of incident at the nuclear plant as a "provocation" to take place during Mr Guterres' visit.

Read More:
The risks at Europe's largest nuclear power plant
Latest Ukraine stories

Talks on ending conflict

Turkey's President Recep Tayyip Erdogan also took part in talks with Mr Guterres and Mr Zelensky in Lviv, saying afterwards they had discussed ways to end the conflict.

Mr Erdogan said they had talked about using the positive atmosphere created by a deal brokered by the UN and Turkey to lift a Russian blockade of Ukrainian grain exports to establish lasting peace.

He also said they discussed the exchange of prisoners of war between Ukraine and Russia, and that he would later raise the issue with Russian President Vladimir Putin.

"We attach great importance to this issue ... of what happened to the exchange of these captives," Mr Erdogan said.

Turkey's Recep Tayyip Erdogan pictured with Volodymyr Zelensky and Antonio Guterres

Relatives of Ukrainian troops who surrendered at the Azovstal steel factory in Mariupol under a UN-backed deal staged a demonstration during Mr Guterres's visit calling for more efforts to protect them.

Dozens of the Azovstal prisoners died in custody of Russian-backed separatists last month in a fiery blast at a prison. Kyiv called it a massacre and a war crime; Moscow accused Ukraine of having struck the prison with rockets, though it provided no explanation for why no guards were hurt.

After months in which Russian forces made modest territorial gains in heavy fighting in the east, front lines in Ukraine have been comparatively static in recent weeks.

Kyiv says it is preparing for a counterattack to recapture a swathe of southern territory, including Kherson province and neighbouring Zaporizhzhia, where the nuclear plant is located.

The war has killed thousands and forced millions to flee. Moscow says its aim is to demilitarise Ukraine and protect Russian-speakers on land that Mr Putin says historically belongs to Russia.

Kyiv and the West call it an unprovoked war to conquer Ukraine and erase its thousand-year national identity.