KYIV, Ukraine (AP) — Europe’s largest nuclear plant has been reconnected to Ukraine’s electricity grid, allowing engineers to shut down its last operational reactor in an attempt to avoid a radiation disaster as fighting rages in the area.

The six-reactor Zaporizhzhia plant lost its outside source of power a week ago after all its power lines were disconnected as a result of shelling. It was operating in “island mode” for several days, generating electricity for crucial cooling systems from its only remaining operational reactor.

Nuclear operator Energoatom said one of those power lines was restored “to its operational capacity” late Saturday, making it possible to run the plant’s safety and other systems on electricity from the power system of Ukraine.

“Therefore, a decision was made to shut down power unit No. 6 and transfer it to the safest state – cold shutdown,” the company said in a statement.

Energoatom said the risk remains high that outside power is cut again, in which case the plant would have to fire up emergency diesel generators to keep the reactors cool and prevent a nuclear meltdown. The company’s chief told The Associated Press on Thursday that the plant only has diesel fuel for 10 days.

The plant, one of the 10 biggest atomic power stations in the world, has been occupied by Russian forces since the early stages of the war. Ukraine and Russia have blamed each other for shelling around the plant that has damaged the power lines connecting it to the grid.

Energoatom renewed its appeal for Russian forces to leave the Zaporizhzhia plant and allow for the creation of a “demilitarized zone” around it.

The International Atomic Energy Agency, the U.N. nuclear watchdog which has two experts at the plant, confirmed to the AP on Sunday that external power has been restored at Zaporizhzhia Nuclear Power Plant.

“After yesterday’s restoration of the power line – which connects the ZNPP to the switchyard of a nearby thermal power station – the operator of the ZNPP this morning shut down its last operating reactor, which over the past week had been providing the plant with the required power after it was disconnected from the grid,” the IAEA said in an emailed statement. “IAEA staff present at the ZNPP were informed this morning about these new developments, which were also confirmed by Ukraine.”

IAEA Director-General Rafael Grossi has called for a safe zone around the plant to avert a disaster.

___

Jon Gambrell and Hanna Ahrirova contributed to this report.

___

Follow the AP’s coverage of the war at https://apnews.com/hub/russia-ukraine