It will take weeks, if not months, before it becomes clear who is going to take over the reins of government in Germany after Sunday's election.

But however complicated the task of forming a new coalition government for the old and soon-to-be-new Chancellor Angela Merkel turns out to be, the proponents of the clean energy revolution, the Energiewende, can breathe a sigh of relief. The worst-case scenario has been averted -- at least for now.

Merkel and her center-right-wing party Christian Democrats celebrated a big win, but came up just a few seats short of the absolute majority it would have needed to form a government by itself. That crushing victory notwithstanding, the Christian Democrats still have to find a new ruling partner, since their coalition member over the last four years, the business-friendly Free Democrats, missed the 5 percent cutoff and will not be represented in the German parliament, the Bundestag, for the first time since World War II.

That in itself is good news for the future of renewables in Germany. It may sound strange to those who haven't followed the political discourse closely in the land of wind and solar (not to mention the country that originated the wildly successful feed-in tariff), but the prospect of the Free Democrats staying in power would have meant the end of the Energiewende. While the massive amount of clean energy fed into the German grid made headlines in January and July, the Free Democrats' minister of economics Philipp Rösler threatened to stop all new installations and kill the renewables energy law (the EEG, or Erneuerbare Energien Gesetz) right after the election. His simple reason: the economy can't afford it.

But Rösler and his party are history, at least for the next four years. In theory, there are five different versions of what the new German government could look like. But the two most likely scenarios are for Merkel to enter into a coalition with either the Social Democrats or the Green Party. Interestingly, those are the parties that can claim to have started the historic energy transition by having set in motion the EEG and the feed-in tariff for renewables when they were in power in 2000.

This does not mean, however, that all parties are still on the same page when it comes to the Energiewende. While a push for Germany to be powered by 100 percent renewables in the near future remains one of the core values of the Greens, the Social Democrats bought into the notion that the transition to clean energy “must remain affordable.” On the campaign trail, that phrase was shorthand for the argument that the number of new wind and solar installations has to slow down. There is also a big contingent within the Social Democratic party that does not believe in a complete transition to renewables and has traditionally been very cozy with the coal industry.

Meanwhile, Merkel's Christian Democrats have been strangely ambivalent about the Energiewende. While the party ran the ministry of environment for the last four years, it did little to actually achieve the self-proclaimed goal of 80 percent renewables by 2050. In fact, while that idea remains very popular with a majority of the country, the last minister of the environment, Peter Altmeier, used his position to incite fears about the mounting costs, especially for the PV feed-in tariff, instead of boasting how much progress the Energiewende had made in the last few years.

So depending on which party Merkel chooses as her junior partner, the scenarios for renewables in Germany will look very different. If the runner-up Social Democrats join Merkel in what is called a “grand coalition” again, the anti-renewable transition blocs within both parties will likely do what they can to put the brakes on the already significant progress in making Germany's energy consumption cleaner. If the Greens end up as Merkel's partner, on the other hand, there is a chance that the naysayers within the Christian Democrats can be marginalized.

Either way, the challenges ahead are huge. Already making up about 25 percent of the energy mix, renewables have reached a point where the traditional energy market design no longer works. With their lack of marginal costs, renewables have created havoc in the merit order system of the European Energy Exchange, leading to negative prices at times of high wind or solar production, kicking gas and coal power plants off the market, and thus eating into the profits of big energy companies. As a result, the four big utilities in Germany claim that it is no longer economically viable to run some of their gas and coal power plants, even though they are still needed to ensure grid stability.

Since most of the wind turbines have been built in the north of the country and most of the PV in the south, either the electrical grid needs to be upgraded or the feed-in tariff needs to be reformed to make sure that more solar is installed in the north and more wind in the south. And while the rise of energy prices for German households, currently at about 2.5 percentage points per year, remains moderate (0.5 percentage points of that rate hike are used to finance the feed-in tariff), it does start to pose a problem for low-income families, a problem that needs to be addressed. The widespread rebates for industry, meanwhile, are also worthy of debate.

While there are individuals and coalitions within the Social Democrats as well as within the Green Party that would be happy to take these challenges on, their party leaders are wrangling with a different concern at the moment. During her almost eight years as chancellor, Merkel has earned the nickname “Black Widow”: She uses her coalition partners to her advantage only to leave them for dead in the next elections. Just ask the Free Democrats.