BERLIN (AP) — Swiss voters rejected a plan to accelerate the country’s exit from nuclear energy in a referendum Sunday, turning down an initiative that would have forced their government to shut the last plant in 2029.

The plan promoted by the Green party would have meant closing three of Switzerland’s five nuclear plants next year. Polls ahead of the referendum had shown a tight race, but voters shot down the initiative by 54.2 percent to 45.8 percent.

Under Switzerland’s direct democracy system, proposals need support from both a majority of the country’s cantons (states) and of the national vote to pass. Only six of Switzerland’s 26 states backed the nuclear shutdown plan.

After the Fukushima nuclear disaster in Japan, the Swiss government adopted a gradualist approach toward transitioning the country to renewable energy by 2050.

It said nuclear plants should continue to operate as long as they are deemed safe, but didn’t set a precise timetable. The government said it needs time to switch to other sources such as wind, solar and biomass energy.

If successful, the initiative would have limited the lifespan of nuclear plants to 45 years and meant the closure next year of the Beznau 1, Beznau 2 and Muehleberg reactors. The newest of the plants, in Leibstadt near the German border, started operating in 1984 and would have had to close in 2029.

The nuclear plants currently generate around a third of Switzerland’s electricity.

“We would have liked to win, that’s clear, but 45 percent for ‘yes’ is a good result,” Regula Rytz, the Greens’ chairwoman, told SRF television. Her party isn’t part of Switzerland’s broad coalition government.

“The problems haven’t been resolved with this referendum Sunday,” Rytz said. “We will keep at it on safety, on financial security … and on expanding renewable energies.”

A group representing Swiss business, economiesuisse, said in a statement that “a hasty exit from nuclear energy would only have brought disadvantages for Switzerland.”

It welcomed what it described in a statement as “voters’ clear signal for a secure electricity supply and strong domestic energy production.”

Neighboring Germany took a sharper turn away from nuclear power after the Fukushima disaster in 2011. It plans to shut down its nuclear power plants by the end of 2022.

The referendum result “is a disappointment for all who had hoped for clarity on when the last nuclear power station in Switzerland will go offline,” Rita Schwarzeluehr-Sutter, a deputy German environment minister, said.

Nuclear power is “an outdated model in Switzerland, too,” she said, adding that the country has some of the world’s oldest reactors and “their days are numbered anyway.”