Stunning delegates at a MacWorld convention in Boston, Steve Jobs, an Apple co-founder, unveiled a sweeping shake-up of the Apple board and announced that Microsoft would invest $150m (pounds 94m) in stock in the company.
"If we want to see Apple move forward," a clearly energised Mr Jobs declared, "we have to let go of a few things here. We have to let go of the notion that for Apple to win, Microsoft has to lose."
The extraordinary news was warmly welcomed by investors, who quickly pushed up Apple shares trading on the Nasdaq in New York. By midday, they were up $7 to $27 a share.
The announcements offered a rare beam of sunshine for Apple, which has lost more than $1.5bn over the last 18 months and was most recently rocked by the July ousting of its fourth chief executive, Gilbert Amelio, in its brief 21-year history.
Among those joining the board will be Mr Jobs as well as the founder of the Oracle Corporation, Larry Ellison, who earlier this year flirted with a buyout of the company. Other newcomers are Jerome York, the former chief financial officer of IBM, and Bill Campbell, the chief executive of Intuit.
Those resigning their positions are, most notably, Mike Markkula, a former Apple chairman and board member for 20 years, as well as Katherine Hudson and Bernard Goldstein.
As well injecting money into Apple, Microsoft will offer a new version of its Office software designed for use on the Macintosh platform. In the meantime, Apple has agreed to bundle Microsoft's still-struggling Microsoft Internet Explorer into its Mac Operating System.
There was some suggestion that Mr Gates may be anxious to keep Apple afloat to forestall a scenario where, following an Apple demise, a virtual monopoly hold by Microsoft on the software market would inevitably attract negative attention from fair competition regulators in Washington.
In a satellite appearance before MacWorld, Mr Gates called the new deal "very exciting".
He added: "We think Apple makes a huge contribution in the computer industry. And we think it's going to be a lot of fun helping out."
While some die-hard Mac fans may be appalled by the bear-hug from the company's long-time foe, Mr Jobs appealed for humility.
"We need all the help we can get. We better treat Microsoft with a little gratitude," he said.
There was no announcement on who will replace Mr Amelio or, indeed, who will assume the chairmanship of the new Apple board. However, speculation was rife that Mr Jobs may be selected for either or both the positions.