With the electric-car revolution perhaps just a few years off, automakers face a looming question: what do you do with all the spent batteries? One answer: turn a huge pile of them into a grid-scale power plant.

Barring a much-needed breakthrough in battery technology, it looks as if we’re going to be stuck with lithium-ion chemistry for a while yet. That’s not necessarily a bad thing—while progress in the area has been a slog, the batteries are continuing to fall in price and could be nearing a tipping point that will see electric-vehicle sales take off.

But like any batteries, they wear out. The rate at which they currently decline puts their lifetime for powering electric vehicles in the neighborhood of eight to 10 years. It’s not that they’re useless after that, but their capacity declines to a point where a car’s range would be depleted.

For BMW's batteries, the i3 is not the end of the line.

So BMW has spent a fair amount of time figuring out how to give spent batteries a second life. It’s experimented, for example, with selling them to consumers in a product similar to Tesla’s Powerwall, to function as a way to store energy at home.

Now It’s gone one bigger. By strapping together batteries from 100 cars, BMW has just completed a grid-scale storage facility in Hamburg, Germany. Capable of storing 2.8 megawatt-hours of energy and delivering up to two megawatts of power at the flip of a switch, the plant is perfect for providing an extra dose of power to the grid during times of peak demand, its operators say.

If electric cars really are about to go mainstream, the rise of used-battery power plants may not be far behind.

(Read more: Electrek, “Why We Still Don’t Have Better Batteries,” “The 2020s Could Be the Decade When Electric Cars Take Over,” “Race for a New Grid Battery Hits a Speed Bump”)