HAMBURG—If you stand on top of a protective dyke in the village of Moorburg and look west or north, you can almost forget that you're standing in the midst of Germany's second-largest city. Behind a tree-shaded 16th-century church, green fields stretch into misty distances and old brick houses line a winding road whose narrow lanes bespeak a time preceding motorized vehicles.

If you look east or south, however, Moorburg becomes something else entirely. Just a stone's throw from the church, towering smokestacks and boxy buildings mark the site of a new power plant that next year will begin converting enormous amounts of coal, one of the world's dirtiest fuels, into electricity. Some of that coal may come from the United States.

Depending on whom you talk to, the Moorburg plant is either a misstep that will derail Germany's goal of getting 80 percent of its energy from renewable sources by 2050—or a bridge that will allow Hamburg's industrial economy to thrive until enough renewables come on line. There's one perspective on which virtually all agree, though: The plant is evidence of the tough decisions and clashing interests at play as Germany tries to wean itself from nuclear energy and fossil fuels.

Read the story of Germany's "Clean Break" from coal, oil and nuclear energy, available as a Kindle Single on Amazon for just 99 cents.

Moorburg isn't the only new coal power plant in Germany, but it is the only one being built in Hamburg, a city known for its parks, waterways, efficient public transportation and, this year, a summer-long international building exhibition focused largely on green construction and energy. In 2011 the European Union declared Hamburg "Europe's Environmental Capital."

Why here, then? Why are utilities betting on coal in a country that aspires to lead the world in renewable energy use, and where coal's main waste product, carbon dioxide, is routinely referred to as the "Klimakiller?"

Some observers have linked the construction of Moorburg and other new coal plants to Germany's decision, made after the 2011 Fukushima disaster in Japan, to close all its nuclear plants by 2022. But the new plants were on drawing boards almost a decade before that, even as Germany was passing a string of federal laws that give clean energy priority over fossil fuels on the transmission grid.

Back then, utility companies assumed that it would be many years before the Energiewende or "energy transition" kicked in and that new, cleaner-burning coal plants would be needed through the transition. Wind and solar energy are inherently intermittent, and engineers haven't yet developed cost-efficient technologies to store electricity generated by renewables. Further, Germany's most reliable source of wind power is offshore, on the North Sea, and transmission lines and other infrastructure must be built to move the electricity to industrial and population centers in the country's south.

"At least until 2030, or 2050, Germany will have to have some fossil-fuel energy," said Jutta Blankau, Hamburg's environment minister and director of the city's Office for Development and Environment, in an interview at her office. "Hamburg is one of the industrial centers of Germany. For now we can't support that through renewable energy alone. We need coal and gas plants to complement power from renewables."

But energy experts say Germany's electricity market has changed fundamentally since the Moorburg plant was conceived.

Wholesale prices for electricity have dropped, and the percentage of electricity produced from renewable sources has grown faster than anyone expected—from 6.8 percent in 2000 to more than 20 percent in 2012. The federal goal calls for renewables' share of electricity generation to rise to at least 35 percent by 2020. The goals of Germany's 16 states, added up, call for even quicker growth.

The speed with which renewables have taken hold has posed a challenge to utilities that rely on fossil fuels, because federal laws require the grid to use all the available renewable energy before turning to coal or other fossil fuels.

As a result of the changing economic playing field, more than two dozen proposed coal power plants that would have generated almost 25 gigawatts have been mothballed, said Rainer Baake, director of Agora Energiewende, a nonprofit think tank focused on Germany's energy policies. Utilities that didn't scrap their plans may be experiencing buyer's remorse.

"All the decisions for these plants were made years ago, when conditions were very different," Baake said in a phone interview. "If the decisions were being made today, I think they would be different. Those who didn't bury their plans in time are going to lose a lot of money."

Still, 10 new coal plants, including Moorburg, have either gone into service in in the last year or are likely to do so in 2013 or 2014, according to the environmental group Deutsche Umwelthilfe. Together, they will be able to generate 11.5 gigawatts of electricity a year.

As they're coming on line, however, old and less efficient fossil-fuel power plants producing 18.5 gigawatts are slated to be mothballed by 2020, due to diminished profitability and stricter European Union air pollution regulations.

Plans for Coal Plant Began a Decade Ago

Planning for the Moorburg plant began a decade ago, not long after the Swedish utility company Vattenfall bought Hamburg's existing municipal utility and became one of the city's principal energy providers. Because Hamburg is such a large electricity market—some individual industrial users here use as much electricity in a year as a mid-sized city—Vattenfall saw a chance to build a profitable, state-of-the-art facility.

With twin boilers and a capacity of more than 1.6 gigawatts, the plant is a giant. When it's operating at full speed, it will consume about 12,000 tons of imported coal a day, to be delivered by freighters up to 960 feet long docked at the plant's own quay on the south branch of the Elbe River. Coal here is still cheap, in large part because the U.S. natural gas boom has dropped coal prices and fueled an export boom.

The Moorburg plant was originally slated to open in 2012, but technical challenges and regulatory and legal clashes with environmental authorities and local residents have slowed its construction and made it much more expensive than planned. The latest price tag is $3.3 billion.

Vattenfall engineers wanted to use a new type of steel, T24, that can expand and contract more readily with changes in temperature than traditional steel. That's a big benefit, because fossil-fuel electricity is increasingly used as a backup for renewables, and boilers need to power up and down more often and more quickly.

But the new steel turned out to be "difficult to work with," said Vattenfall spokeswoman Gudrun Bode during a plant tour this spring. The boilers developed cracks, and fixing them required about a year.

Other challenges have come from Vattenfall's fraught relationship with regulators and citizens. City planners required the company—at a cost of about $20 million—to conform to the city's long tradition of building with indigenous brick.

City planners also decided that the plant shouldn't mar the harbor skyline with a giant conventional cooling tower. So Vattenfall designed a much shorter structure that can also cool exhaust steam without a telltale plume of steam—another visual blemish that planners wanted to avoid.

Unfortunately for Vattenfall—and for Germany's energy efficiency goals—when this hybrid cooling tower is running, it will reduce the plant's overall efficiency by between 1 and 1.5 percent. At first, that didn't seem like a big problem, because Vattenfall expected to draw most of the plant's cooling water directly from the Elbe. The tower would be used only in warm weather, when environmental regulations prohibit the release of warmed water back into the river. But this year a Hamburg court agreed with a lawsuit filed by the German environmental group BUND that Vattenfall shouldn't be allowed to withdraw any water from the river for cooling.

Vattenfall has appealed that decision. But if it stands, the company will have to operate the cooling tower 24/7, with a concomitant loss of efficiency "and an associated level of higher CO2 emissions," acknowledged Bode.

Far more of the plant's planned efficiency disappeared when Vattenfall lost its bid to send the facility's waste heat through a tunnel to heat as many as 180,000 households on the other side of the Elbe. That could have increased the plant's efficiency to up to 61 percent, far more than the 38 percent average among German coal-fired power plants. But the tunnel's construction required the felling of trees in a beloved neighborhood park, and the city vetoed the idea, though Vattenfall and city planners still talk about using the excess warmth to heat other neighborhoods.

"For Vattenfall it would have been more profitable to build the district heating system," said Blankau, Hamburg's environment minister. "We in the city wanted to produce less CO2, yes, but there was also a political question. We wanted to avoid a bigger political split in the city."

Vattenfall didn't help its case, at least from the public-relations perspective, when in 2009 it sued Germany for more than $1.8 billion in the Washington-based International Centre for Settlement of Investment Disputes, claiming that the Moorburg plant had been saddled with unduly harsh environmental restrictions. The two parties settled out of court, under terms that remain confidential.

Vattenfall also filed suit against the German government last year, claiming that because of the federal anti-nuclear decision it couldn't continue operating two nuclear plants in north Germany. That case is still in arbitration.

Will the Investment Pay Off?

The tangled history of the Moorburg plant has made Vattenfall an unloved presence in Hamburg, and has delayed the date when the plant can go online. Vattenfall representatives won't say what that date is, but they promise it will come in 2014.

There's even less certainly about when—or if—the company's considerable investment will pay off, though spokeswoman Bode insists that it will.

"The costs are going to come back to the company," she says. "We just don't know when that will happen."

Because renewable resources have priority on the electric grid—and because renewables are growing faster than expected—operators of fossil-fuel plants can no longer rely on the guaranteed base load market that they once considered a birthright.

"The number of hours that these coal plants will be able to be in production will be far less than planned," predicted Felix Matthes, director of the Berlin-based Eco-Institute, a think tank dealing with issues of sustainability, in a phone interview. "Their full capacities will be generated only for relatively short terms."

Every hour that a coal plant is operating at less than full capacity is an hour of reduced profits. As Germany's renewable build-out continues, that may add up to a lot of hours.

Still, some factors remain in coal's favor.

Carbon emissions in the European Union were supposed to be firmly regulated by now by through the trading of emissions certificates, a program that forces companies that produce large amounts of greenhouse gasses to pay for the right to pollute. But the prices of the certificates are so low that they play practically no role in the economics of power plants.

In addition, coal is currently much cheaper in Europe than natural gas. According to a recent review of Germany's energy policies by the International Energy Agency, coal is so cheap that it has de-incentivized the construction of more efficient and more flexible natural gas plants, thereby threatening the progress of the Energiewende.

Fossil Fuels Still Needed

Everyone acknowledges that Germany's grid still needs energy from fossil fuels. There will be times—say, on a still winter night when neither solar panels nor wind turbines are doing much good—when a large surge of electricity will have to come from non-renewable sources. According to projections from Agora Energiewende, Germany will need about 25 gigawatts of peak generating capacity by 2020, but it will need that electricity for only about 100 hours a year.

The problem is that a mechanism for paying utilities to keep power plants on standby for those few hours doesn't exist yet—and plants with that much flexibility are much likelier to be run on gas rather than coal.

As the leaders of Germany's Energiewende continue to wrestle with these problems, even the utilities that hope to continue profiting from the use of coal are hedging their bets. Vattenfall has invested in several large offshore wind parks in Germany and other European countries, as well as in smaller renewable-energy projects like a hydrogen refueling station in Hamburg's downtown.

The push-pull between coal and renewables is graphically visible at Moorburg. Across the South Elbe from the quay where Vattenfall hopes coal freighters will be docking next year are two large wind turbines, turning slowly as the power plant's construction proceeds.

Hamburg environmental minister Jutta Blankau said the city is investing in more wind turbines, and in replacing old turbines with newer, larger ones.

But Blankau also acknowledged that the Moorburg coal plant will be a part of Hamburg's energy mix for at least the near future.

"We can't turn it off now," she said. "We have to bite into the sour apple, even if we don't like it."