The Belgian government has agreed in principle to close its nuclear power plants by 2025, but left open the possibility of extending the life of two reactors if it could not otherwise ensure energy supply.
The seven-party coalition has wrestled for months with the topic, with the Greens adamant that a 2003 law setting out a nuclear exit be respected, while the French-speaking liberals favoured extending the life of the two newest reactors.
The government had given itself an end-2021 deadline to settle the matter.
Belgium's two nuclear plants, with seven reactors in total, are operated by French utility Engie and account for almost half of the country's electricity production.
After talks through the night, ministers settled on a compromise whereby the last existing nuclear power plant should close in 2025, joining other countries such as Germany that are also phasing out the technology.
However, Belgium still needs to establish how to make up for the energy shortfall and there is a problem. The winner of a contract to build a gas-fired plant just north of Brussels has been denied a permit.
The government will now wait until 15 March to see if the permit is granted and, if not, look into other options, including other contract bidders.
Prime Minister Alexander De Croo said it was possible that certain nuclear reactors could be left to operate longer, but added that was "very unlikely".
Belgium will also invest €100m over four years in research into nuclear power technology, emphasising smaller modular reactors and possibly co-operating with France and the Netherlands.
The planned nuclear exit will begin with the closure of one reactor on 1 October 2022.
Decommissioning, including the removal of all radioactive materials and demolition of buildings, is to be completed by 2045.