Leaders of Germany's three-party ruling coalition agreed on a new draft budget for next year after weeks of tense negotiations that mired the government in political and fiscal crisis.

“The government is sticking to its goals,” Chancellor Olaf Scholz said in Berlin. But, he added, “it’s also clear that we have to make do with significantly less money to achieve these goals.”

Scholz promised Germany would continue to meet commitments to promote the green transition of the country’s industry and provide military aid to Ukraine. But he also said the government would have to rein in spending to plug an estimated €17 billion financial gap for 2024.

That gap emerged after a bombshell ruling by Germany's top court last month blew a €60 billion hole in the country's finances. The ruling also limited the government's ability to draw money from special funds that had been set up to circumvent the constitutional debt brake, which restricts the federal deficit to 0.35 percent of GDP except in times of emergency.

Yet, Scholz also kept open the door to a potential debt brake suspension for 2024 should the war in Ukraine escalate, or if allies like the U.S. reduce their support. Such a scenario, he suggested, would require Germany to increase its aid.

"If the situation worsens as a result of Russia's war against Ukraine, for example because the situation on the front deteriorates or because other supporters reduce their aid to Ukraine or because the threat to Germany and Europe increases further, we will have to respond to this," Scholz told reporters.

Later, while speaking to lawmakers in parliament, Scholz underscored the point.

“Putin is still determined to bring Ukraine to its knees by military force," he said. "And he is counting on international support for Ukraine waning. Unfortunately, the danger that this calculation might work out cannot be denied."

The leaders of the three-party ruling coalition — comprised of the center-left Social Democrats (SPD), the Greens and the fiscally conservative Free Democrats (FDP) — did not reveal the full details for how they plan to plug the €17 billion gap.

But officials did highlight some of the planned measures. The government intends to abolish subsidies on diesel in the agricultural sector and introduce a tax on jet fuel for flights inside Germany. It also plans to have manufacturers or retailers pay a tax on plastic packaging that could bring in an estimated €1.4 billion. The government also wants to increase a levy on carbon emissions; that measure is likely to prove controversial, as it's likely to raise fuel and heating costs.

The budget deal will allow Germany to maintain subsidies that promote the construction of semiconductor plants and support clean energy in industries and homes. State aid to help steel plants transition from natural gas to hydrogen energy, for example, will remain in place. Yet, other subsidies for solar panels and electric cars would likely be cut.

With the draft agreement today, the leaders of the ruling parties hope to quell a crisis that has been rocking the government for weeks, leading to record low approval ratings for Scholz.

Yet, Germany’s budget crisis is unlikely to fade anytime soon.

Over the longer term, the government will continue to grapple with how to fund ambitious plans to transform industry, invest heavily in infrastructure, and maintain social welfare spending while abiding by the debt brake.

And then there’s the immediate political fight. The proposed budget for 2024 will still need to be approved in parliament before taking effect early next year.

Members of Germany’s conservative opposition are already attacking the budget plan.

Friedrich Merz, leader of the center-right Christian Democrats, sharply criticized Scholz, arguing that the chancellor's comments about potentially suspending the debt brake over Ukraine aid were "fiscal policy trickery," arguing it would allow the government to use the war to justify more spending in other areas.

"The trick is obvious," Merz said in parliament.