IT MAY not quite be napalm in the morning, but there were echoes of “Apocalypse Now” when the boss of Toyota, Akio Toyoda, declared at the otherwise greener-than-thou Tokyo Motor Show this week: “Personally, I love the smell of gasoline.” Reassuring stuff for petrol heads everywhere.

But his point was that he did not expect any emerging fuel technology to win hands down in coming years. Hybrids, electric vehicles, fuel cells—he reckons that they all will co-exist with each other, as well as with the venerable combustion engine, for many years to come.

As if to emphasise the point, a day later, on December 1st Toyota and BMW, the German carmaker, signed an agreement to develop a new generation of lithium-ion batteries, a collaboration they hope to expand to other technologies, perhaps including fuel cells. What is more, BMW agreed to supply Toyota with 1.6-litre and 2-litre diesel engines in Europe, starting in 2014.

For Toyota, taking BMW's diesel engines is a tacit admission that its hybrid strategy does not cut it in Europe. Consumers there are too attached to diesel, which runs more efficiently and produces less carbon dioxide than petrol engines. Cars with diesel engines are generally cheaper than hybrid and electric vehicles.

Yet the tie-up also reflects the fact that Toyota, having sold more than 3.4m hybrids since 1997, is a leader in car-battery technology and has expertise to share. BMW, meanwhile, has had a bumper year in Japan, partly because Toyota's Lexus brand suffered from supply problems following the March 11th earthquake and tsunami. The German firm says its sales in Japan this year rose 8% up to October. It also sells more hybrids in Japan than anywhere else in the world. A new generation of batteries would help what is at the moment a fledgling move into hybrids.

Besides the interests at stake, there is a trend here. Car companies, like aircraft manufacturers, are sharing engineering skills across borders to speed up and cut the costs of technological development. It happened with Boeing's 787 Dreamliner. The American aircraft maker outsourced some of the engineering to Japanese suppliers, admitting that it does not have all the necessary expertise. Likewise, Toyota has agreed to work on hybrid trucks with Ford, and electric vehicles with Tesla, the Silicon Valley sports-car maker. BMW is working on improving the current generation of lithium-ion batteries with France's Peugeot Citroën. Nissan, as well as joining forces with Renault, has joint projects with Daimler.

Neither Toyota nor BMW were prepared to say where they expected their collaboration to lead. Over the long term, they may be exploring alternatives to lithium, which one Toyota executive said this week was excessively concentrated in the hands of China—a country that has ambitious plans to expand the use of electric cars.

The firms did not rule out the possibility that Toyota and BMW could eventually take stakes in each other. Both sides would be very cautious about such a move, however. For a lesson in how such partnerships can go wrong, they just need to look at another Japan-German rapprochement—that of Suzuki Motors and Volkswagen. The former last week said it had taken VW to arbitration in London over their failed two-year partnership and its so far unsuccessful attempt to force the Germans to sell back their 19.9% stake in Suzuki.