Toyota said on Monday that it would allow a battery-supply deal with Tesla Motors to expire this year and would focus instead on building cars running on hydrogen fuel cells, a next-generation technology that rivals Tesla’s all-electric systems.

Toyota Motor invested $50 million in Tesla to acquire a 3 percent stake in the Silicon Valley upstart in 2010, and signed a $100 million joint-development deal in 2011 for a version of Toyota’s RAV4 crossover sport utility vehicle that carried Tesla’s electric powertrains. At the time, the two automakers suggested that the RAV4 electric vehicle could be the start of a wider collaboration.

But the electric RAV4 has sold poorly, despite low-cost lease and loan offers Toyota introduced last year to promote sales. And Toyota has increasingly signaled that it sees fuel cells as the most viable zero-emissions technology, putting it at odds with Tesla, an evangelist for electric-vehicle technology. Toyota is also the world’s biggest manufacturer of gas-electric hybrids.

Toyota said in an emailed statement that it was “re-evaluating” its RAV4 electric vehicle, and that Tesla’s supply agreement for the model would “conclude this year.” Toyota said that its contract had called for Tesla to supply 2,500 battery-electric powertrains for the RAV4.