In the wake of the auto industry collapse in 2010, Toyota made a move that many industry watchers applauded. It partnered with electric vehicle maker Tesla to incorporate its battery technology into future Toyota cars and SUVs. Tesla was seeing success in a very niche market with its Tesla Roadster, so it seemed like a safe bet for the Japanese company to bring it to the mainstream. Four years and one spectacularly failed vehicle later, Toyota is throwing in the towel on pure electric vehicles in favor of hydrogen fuel cells.

Tesla is the brainchild of Elon Musk, now equally famous for his private space firm SpaceX. With the Roadster, this was the first auto manufacturer to make an electric vehicle that didn’t drive like a golf cart, but it was also hugely expensive. Toyota wanted to get its hands on that electric powertrain technology for use in its vehicles, and it started with an all-electric RAV4 SUV. Unfortunately, Toyota could hardly even give these things away.

Tesla has confirmed in regulatory filings that the supply deal is coming to an end, but Toyota is keeping its 3% stake in Tesla for the time being. Toyota’s new vision for zero-emission cars goes back to a technology that was all the rage a few years ago — hydrogen fuel cells.

Much of the attention Tesla gets probably has as much to do with being a slick Silicon Valley startup as it does with making interesting electric cars. None of that Tesla mystique has rubbed off on Toyota’s EVs. Even so, it’s a bold decision to move away from a workable but boring solution like batteries to the sexier hydrogen fuel cell option. Toyota might be trading a problem of marketing for a much harder to solve technological one.

The makers of electric vehicles and plug-in hybrids (which Toyota is still the top manufacturer of) have worked to make their products more attractive by investing in EV recharging stations throughout the US. Tesla is particularly fond of pointing out how far you can drive one of its cars if you carefully plan your trip to take advantage of existing Supercharger stations. Even if you don’t have a nearby EV charger and the only power around is a regular 110v socket, you can still charge your EV — it just might take 8 hours. They don’t exactly build houses with hot and cold running hydrogen.

Toyota is reportedly working on hydrogen refueling stations that would support its fuel cell vehicles (FCVs), but it’s unclear where all that hydrogen is going to come from. Despite being the most common element in the universe, pure hydrogen is not particularly easy to come by on Earth. The most common method of producing hydrogen involves stripping it off hydrocarbons like methane and gasoline through a process called steam reforming. That doesn’t do much to reduce our dependance on fossil fuels, but other methods like bioreactors and water electrolysis are far from efficient enough for industrial scale production.

Tesla is preparing to launch its own all-electric crossover SUV next year, called the Tesla Model X. Toyota is expected to unveil a new 4-door sedan in the US next year that relies entirely on hydrogen fuel cells for power. It’s going to be an interesting matchup.