Apple co-founder Steve Jobs was no stranger to legal battles involving the patent system. Apple is currently waging war on a number of Android vendors and the company’s former CEO vowed to crush Google’s mobile platform before his untimely passing last year. “I will spend my last dying breath if I need to, and I will spend every penny of Apple’s $40 billion in the bank, to right this wrong,” Jobs said, according to Walter Isaacson’s biography of the Apple boss. “I’m going to destroy Android, because it’s a stolen product. I’m willing to go thermonuclear war on this.” But more than a decade before the iPhone even existed, Apple was locked in patent battles with Microsoft that would end up saving the company from the brink of bankruptcy. Read on for more.

Microsoft’s 1997 investment in Apple is now a major bullet point in Apple’s history that is known the world over. As Apple struggled to stay alive, Jobs and his team managed to secure a $150 million investment that ended up helping to keep the company afloat long enough to begin a climb that would eventually see it become the most valuable company in the world.

An important piece of the story that often isn’t discussed, however, is that Jobs used the legal battles in which Apple and Microsoft were engaged at the time to convince Gates to work out a new software deal and, ultimately, to make a $150 million investment in Apple. From Walter Isaacson’s Jobs biography, as quoted by Forbes:

I called up Bill and said, “I’m going to turn this thing around.” Bill always had a soft spot for Apple. We got him into the application software business. The first Microsoft apps were Excel and Word for the Mac. So I called him and said, “I need help.” Microsoft was walking over Apple’s patents. I said, “If we kept up our lawsuits, a few years from now we could win a billion-dollar patent suit. You know it, and I know it. But Apple’s not going to survive that long if we’re at war. I know that. So let’s figure out how to settle this right away. All I need is a commitment that Microsoft will keep developing for the Mac and an investment by Microsoft in Apple so it has a stake in our success.”

The rest, as they say, is history.