Forty years ago, an Exxon executive named George Piercy led a small gang of oilmen into a Vienna hotel room. They were there to meet Sheikh Yamani, Saudi Arabia’s oil minster and negotiator for OPEC (the Organization of the Petroleum Exporting Countries), which was demanding a 100 percent price hike in response to the Yom Kippur War. Long story short, Piercy said no. Yamani called his colleagues in Baghdad to deliver the news. Piercy asked what happened next. Yamani answered, famously, “Listen to the radio.”

We know what happened next: the first OPEC oil embargo, and with it gas rationing in the West. But something else happened then that we often forget: an aggressive international effort to develop electric cars and advanced batteries, an effort that led directly—if slowly—to the Tesla Model S’s and Chevy Volts on the road today.

Now, it’s not as if the day the 1973 oil embargo began, Detroit CEOs picked up their phones and screamed “Build me an electric car, stat!” That effort had already begun. By the late 1960s, smog was so thick in the Los Angeles basin that local politicians were talking about banning the internal combustion engine. In response, all of the Big Four Detroit automakers (remember, American Motors was still around) started working on electric-vehicle technology. In 1967 Ford developed a molten-sodium battery that was so unconventional it broke a research logjam. The 1973 oil embargo supplied this simmering research scene with apocalyptic urgency and essentially unlimited funding.

Even Exxon started planning for the end of oil. The head of the firm’s research division at the time: George Piercy, whose experience in Vienna informed the priorities of his entire company. In 1976 Stan Whittingham, a young battery engineer working in an Exxon research and development lab in Linden, N.J., published a paper in Science detailing the first rechargeable lithium battery. It had problems, including a tendency to burst into flames. Nevertheless, it became the ur-battery whose descendants now power every serious electric car of the 21st century.

Why did it take four decades to get viable electric cars on the road? Part of the answer has to do with the intrinsic difficulty of battery chemistry. Batteries are messy, disobedient, devilish machines. They don’t obey Moore’s law. It has simply taken researchers a long time to work through all of the problems.

But it could have happened more quickly. A big part of the problem is that as soon as oil got cheap again in the 1980s, companies and governments shut down all those battery-research projects they had started in the 1970s. Exxon closed Whittingham’s shop. The U.S. government largely got out of clean-energy research as well. As Whittingham told me for my 2011 book on the subject, “When Exxon stopped, the federal government in their ignorance decided, ‘If Exxon’s not doing it, it’s not worth doing.’” He added, “If Reagan had continued the programs the Jimmy Carter administration started, we’d be a lot further ahead. But that didn’t happen, and so we had this hiatus.”

The lesson, in case it’s not obvious, is that if basic research is funded in fits and starts, then that is exactly how it proceeds.

The battery-research hiatus ended when Japanese electronics companies picked up the moldering literature in pursuit of smaller, longer-lasting consumer gadgets. Sony commercialized the lithium ion battery in 1991, but by the mid-1990s, when GM started work on its short-lived EV1 electric car, lithium-ion still wasn’t mature enough for use in an automobile.

Sixteen years later, facing doom, General Motors threw a historic Hail Mary and announced that it would build the lithium ion–powered Chevy Volt plug-in hybrid. We can now say that electric cars have arrived—(a few of them, at least) and this time, they don’t seem to be going away. But if we get distracted again from basic research by cheap energy or political dysfunction, it’s going to take a lot longer than it should for the next generation of electric cars to get here.