An operation to switch off France's oldest nuclear plant began on Monday, ending four decades of output that built the local economy but also fueled cross-border controversy.

The second and last reactor of the plant at Fessenheim in eastern France -- opened in 1977 and three years over its projected 40-year life span -- should go offline shortly before midnight, said state-owned power company EDF.

The procedure to finally shut down the plant, four months after the first reactor was taken offline, started hours earlier than scheduled, and will be followed in the coming months and years by the site's dismantlement.

Its closure is welcomed by anti-nuclear campaigners in France, Germany and Switzerland, who for years warned of contamination risks, particularly after the catastrophic meltdown at Fukushima, Japan in 2011.

Then-president Francois Hollande pledged to close Fessenheim -- on the Rhine river -- but it was not until 2018 that his successor Emmanuel Macron gave the final green light.

After its disconnection from the power grid Monday, it will be months before Fessenheim's reactors have cooled enough for the spent fuel to be removed.

That process should be completed by 2023, but the plant is not expected to be fully dismantled before at least 2040.

The closure threatens the livelihoods of 2,500 people in the tiny Alsatian community.

Only 294 people will be needed on site for the fuel removal process until 2023, and about 60 after that for the final disassembly.

At the end of 2017, Fessenheim had more than 1,000 employees and service providers on site.

The sun sets on the Fessenheim nuclear power plant
The sun sets on the Fessenheim nuclear power plant AFP / SEBASTIEN BOZON

"What pain, it is inhuman what is happening," the CGT labour union tweeted as the first switches were flicked.

The government has said workers will be transferred to other EDF sites. But many would have to leave their families behind.

There is no legal limit on the life span of French nuclear power stations, but EDF had envisaged a 40-year ceiling for all second-generation reactors, which use pressurised water technology.

France's ASN nuclear safety authority has said reactors can be operated beyond 40 years only if ambitious safety improvements are undertaken.

In the 1990s and 2000s, several safety failures were reported at Fessenheim, including an electrical fault, cracks in a reactor cover, a chemistry error, water pollution, a fuel leak, and non-lethal radioactive contamination of workers.

In 2007, the same year a Swiss study found that seismic risks in the Alsace region had been underestimated during construction, the ASN denounced a "lack of rigour" in EDF's operation of the plant.

Without Fessenheim, France will still have 56 pressurised water reactors at 18 nuclear plants generating around 70 percent of its electricity. Only the United States, with 98, has more reactors, but France is by far the world's biggest consumer of nuclear energy.

In January, the government said it would shut 12 more reactors nearing or exceeding the 40-year limit by 2035, when nuclear power should represent just 50 percent of the country's energy mix in favour of renewable sources.

At the same time, EDF is racing to get its first next-generation reactor running by 2022 -- 10 years behind schedule -- and more may be in the pipeline.

Future plans under consideration for Fessenheim include turning it into a site for recycling low-level radioactive metal, or a biofuel plant, both promising to bring back hundreds of jobs, but neither expected to materialise for several more years.

For Fessenheim Mayor Claude Brender, closing a plant that is "in good working order and has passed all the security tests" was "absurd and incomprehensible".