Germany's parliament was preparing Friday to pass new legislation finalizing the country's long-awaited phase-out of coal as an energy source, over objections from environmental groups the plan is not ambitious enough.

Both houses of parliament were to vote on the roadmap that envisions the phase-out of coal between now and 2038.

It earmarks some 40 billion euros ($45 billion) to affected regions to support them with the transition.

FILE - In this Aug. 27, 2018 file photo a bucket wheel digs for coal near the Hambach Forest near Dueren, Germany. Germany's greenhouse gas emissions fell sharply last year, putting the country's 2020 climate goal within reach again. The state governors Dietmar Woidke of Brandenburg, Michael Kretschmer of Saxony, Reiner Haseloff of Saxony-Anhalt and Armin Laschet of North Rhine-Westphalia meet in Berlin for the adoption by the Bundestag and Bundesrat of the laws on coal phase-out and structural strengthening in the affected federal states. (AP PhotoMartin Meissner)

FILE - In this Aug. 27, 2018 file photo a bucket wheel digs for coal near the Hambach Forest near Dueren, Germany. Germany's greenhouse gas emissions fell sharply last year, putting the country's 2020 climate goal within reach again. The state governors Dietmar Woidke of Brandenburg, Michael Kretschmer of Saxony, Reiner Haseloff of Saxony-Anhalt and Armin Laschet of North Rhine-Westphalia meet in Berlin for the adoption by the Bundestag and Bundesrat of the laws on coal phase-out and structural strengthening in the affected federal states. (AP PhotoMartin Meissner)

Germany is already phasing out nuclear power and the government envisions greater reliance on renewable energy as well as hydrogen and natural gas in the future.

Part of the funds are targeted for the conversion of newer coal-fired plants to gas.

Greenpeace, which planned to protest the parliamentary vote, has said the plan does more to appease the energy companies than to protect the environment.

FILE-In this Nov. 24, 2019 file photo supporters of the climate movement Ende Gelaende protest at the coal-fired power station Lippendorf near Leipzig, Germany. The state governors Dietmar Woidke of Brandenburg, Michael Kretschmer of Saxony, Reiner Haseloff of Saxony-Anhalt and Armin Laschet of North Rhine-Westphalia meet in Berlin for the adoption by the Bundestag and Bundesrat of the laws on coal phase-out and structural strengthening in the affected federal states. (AP PhotoJens Meyer)

FILE-In this Nov. 24, 2019 file photo supporters of the climate movement Ende Gelaende protest at the coal-fired power station Lippendorf near Leipzig, Germany. The state governors Dietmar Woidke of Brandenburg, Michael Kretschmer of Saxony, Reiner Haseloff of Saxony-Anhalt and Armin Laschet of North Rhine-Westphalia meet in Berlin for the adoption by the Bundestag and Bundesrat of the laws on coal phase-out and structural strengthening in the affected federal states. (AP PhotoJens Meyer)

FILE-In this June 5, 2018 file photo, steam rises in the air from the brown coal power plant Schwarze Pumpe in the Lusatia, (Lausitz) area in Germany. The state governors Dietmar Woidke of Brandenburg, Michael Kretschmer of Saxony, Reiner Haseloff of Saxony-Anhalt and Armin Laschet of North Rhine-Westphalia meet in Berlin for the adoption by the Bundestag and Bundesrat of the laws on coal phase-out and structural strengthening in the affected federal states. (AP PhotoMarkus Schreiber)

FILE-In this June 5, 2018 file photo, steam rises in the air from the brown coal power plant Schwarze Pumpe in the Lusatia, (Lausitz) area in Germany. The state governors Dietmar Woidke of Brandenburg, Michael Kretschmer of Saxony, Reiner Haseloff of Saxony-Anhalt and Armin Laschet of North Rhine-Westphalia meet in Berlin for the adoption by the Bundestag and Bundesrat of the laws on coal phase-out and structural strengthening in the affected federal states. (AP PhotoMarkus Schreiber)

FILE - In this Dec. 16, 2009 file photo, steam and smoke rise from a coal burning power plant in Gelsenkirchen, Germany. The state governors Dietmar Woidke of Brandenburg, Michael Kretschmer of Saxony, Reiner Haseloff of Saxony-Anhalt and Armin Laschet of North Rhine-Westphalia meet in Berlin for the adoption by the Bundestag and Bundesrat of the laws on coal phase-out and structural strengthening in the affected federal states. (AP PhotoMartin Meissner, File)

FILE - In this Dec. 16, 2009 file photo, steam and smoke rise from a coal burning power plant in Gelsenkirchen, Germany. The state governors Dietmar Woidke of Brandenburg, Michael Kretschmer of Saxony, Reiner Haseloff of Saxony-Anhalt and Armin Laschet of North Rhine-Westphalia meet in Berlin for the adoption by the Bundestag and Bundesrat of the laws on coal phase-out and structural strengthening in the affected federal states. (AP PhotoMartin Meissner, File)