Steve Jobs wanted to build an electric car as far back as 2008. In 2014, Tim Cook reportedly funded the project. To date, though, Apple has had little to show for it, and the rumors are that its electric vehicle will launch as late as 2025 — long after such things become common commodities. Google has already had self-driving electric cars on the road for about four years, though it has decided to focus primarily on the software.

A decade after Tesla announced the Model S, and six years after its delivery, no other company has been able to produce anything comparable. The big automotive manufacturers are claiming they will soon eat Tesla’s lunch, but even the strongest offerings — those of BMW and Mercedes — are merely souped-up cassette players trying to compete with an iPod.

Tesla learned the hard way the intricacies of combining legacy automotive technologies with modern software — through trial and error and constant delay. It also struggled to automate production.  Using advanced robots, however, it has finally figured out how to build an astonishing 6,000 cars per week, some in a tent.

Now, as Tesla struggles with its cash balances, extremely negative press, and Elon Musk’s erratic tweets, it is at another crossroads and, in order to reach its potential, needs a strategic partner. It may not make sense for it to continue as a public company.

The best acquirer would not be Saudi Arabia, whose interest Musk tweeted about, because that nation’s interests inherently conflict with Tesla’s. Electric vehicles and solar technologies will cause the price of oil to plummet and decimate the value of Saudi oil reserves, so it would lose heavily if its investment in Tesla paid off. Technology companies, however, share Musk’s goals and ambitions, particularly Apple and Google. They have the money, technology, and marketing strengths to greatly enhance Tesla’s offerings. Apple also has great manufacturing prowess and distribution channels.

Tesla would provide Apple with an entirely new set of technology platforms on which it could build a new line of products. Apple desperately needs these in order to sustain its trillion-dollar market capitalization; after the release of the iPhone, in 2007, it has had virtually no world-changing products. It needs to enter new markets, and, with its automotive, energy storage, and solar technologies, Tesla would provide them.

Apple’s existing products would also benefit from the advanced technologies electric cars have incorporated, such a batteries and in-car electronics. And Apple would gain the second-best self-driving software in the industry.

Tesla could, in turn, integrate the iPad, Apple TV, iTunes, and App Store into its automotives, literally turning its vehicles into iCars. And it could replace its clunky operating system with macOS. I’m sure all Tesla owners —  I’m one — would love to be able to download apps and music onto a console that’s more user friendly than Tesla’s present one.

Apple would bring its world-class manufacturing and inventory-management process to Tesla and create new types of automobiles, in different sizes and shapes — and at lower prices. This would give it a second chance to wow markets it has largely lost; specifically India and China.

Google’s interests also coincide with Tesla’s. Google doesn’t have Apple’s manufacturing capability, but its maps and self-driving software are one or two notches above any other. Tesla’s mapping software is substandard, and its self-driving software can use a major upgrade. Google’s self-driving-car spinoff, Waymo, could focus on the software and let Google’s Tesla arm deal with the hardware.

Given that Morgan Stanley has just valued Waymo at $175 billion, Tesla’s $70 billion price would be a no-brainer, and the combination would be formidable.

Would Musk even entertain such an offer? Given that he reportedly turned down an offer from Google in 2013 and laughed off the idea of an Apple buy-up in emails I exchanged with him in April 2014 and in an earnings call last year, it would have seemed very unlikely even a few weeks ago. Yet, things may have changed. Musk has admitted to reaching his personal limits and being close to burnout; he’s seen the disastrous impact of his tweet about having secured funding; and he’s seen the news of Saudi Arabia offering investment in a competing startup.

I’ll bet that Musk would take an offer that solved his financial problems and gave him autonomy. With the headaches of funding and quarterly stock pressure taken away, the world’s greatest innovator would be free to develop world-changing ideas that transform entire industries, including automotive, energy, and space. That would be a win–win for Tesla — and for humanity.

Vivek Wadhwa is a Distinguished Fellow at Harvard Law School and Carnegie Mellon University at Silicon Valley.