Over the weekend, Germany did something amazing: It produced so much renewable energy that the cost of electricity actually went negative for a few hours.

Yes, companies were actually paying some people to use electricity.

Normally, Germany's renewable sources contribute an average of 33% of the country's total power consumption. But thanks to a particularly sunny and windy day, the country's various solar-, wind- and hydro-power planets were supplying 87% of the total energy consumed.

TOBIAS SCHWARZ/Getty Images

That big dip in the graph below is where the prices went negative:

This is an incredible achievement, but it revealed a big problem: The country doesn't have a good system in place to take coal, nuclear and gas plants offline when a renewable surplus happens.

That's why some industrial customers actually earned money from power companies. The problem is partly because it's hard to shut down something like a nuclear power plant and then crank it back up, Quartz reported.

A closed nuclear power plant in Germany Carsten Rehder/AP

Still, Germany will have to find a way to correct the problem: It's planning to operate on 100% renewable energy by 2050.

Some believe 100% renewable energy isn't possible because of natural decreases in sunlight and wind power, but in 2015, Costa Rica ran on 100% renewable power for 75 days. And Denmark regularly hits 100% and exports its excess power to neighboring countries.

Wind-powered turbines in Samsø, Denmark AFP/Getty Images

Renewable energy is the future. When will America enact the policies to make it happen?

h/t Quartz