Germany’s transition from coal- and oil-fired power to carbon-free electricity hit a new milestone on July 25 when solar, wind, and other sources of renewable energy met 78 percent of the day’s energy demand.

That beat the old record of 74 percent, made in May 2014, according to Craig Morris, a journalist who has covered Germany’s energy scene for more than a decade.

Helping set the record was an unusual weather pattern that brought heavy winds where most of the nation’s wind turbines are located. As the turbines generated more power, utilities ramped down coal- and gas-fired power plants.

But Morris found the power mix a few days earlier even more encouraging. During the night of July 22, even with darkness reducing solar output to zero and no big winds in the forecast, renewables—wind, biomass, and hydropower—generated nearly 25 percent of Germany’s electricity.

Morris found the energy data for both dates using an online tool sponsored by the Germany-based Fraunhofer Institute for Solar Energy Systems.

RELATED: Countries Big and Small Are Connecting Economic Growth to Renewable Energy, and It’s Working

Germany’s experience shows that solar and wind can keep the lights on in a highly industrialized nation, said Osha Gray Davidson, author of Clean Break, a book about Germany’s transition to carbon-free energy. “The key indicator is percentage of electricity produced by different sources—28 percent of Germany’s electricity comes from renewables annually, which is pretty amazing for large industrialized country,” Davidson said.

Germany is a model for the United States, he said, “because manufacturing accounts for much more of the German economy than the American economy, and they have 80 million people—much larger than a country like Denmark, which gets more of its power from renewables but has a much smaller industrial base, and has a population of five and a half million people.”

The U.S. currently gets around 10 percent of its electricity from renewable sources, according to the federal Energy Information Administration.