Former Microsoft CEO Steve Ballmer has admitted that Microsoft was crazy to invest in Apple back in 1997 when the brand was on the brink of bankruptcy. The $150m (£97.6m) cash injection famously helped Apple come back from the brink and blow past every tech competitor in its path to market domination and becoming the world's most valuable company.

Ballmer was speaking on Bloomberg TV where he was asked during an interview his thoughts on Apple and while he commended the iPhone maker on its success he made it clear Microsoft's deal to invest $150m (£97.6m) for shares of non-voting stock could have been its biggest mistake.

"They've done a great job. They're a company that's done a great job. If you go back to 1997, when Steve came back, when they were almost bankrupt, we made an investment in Apple as part of settling a lawsuit. We, Microsoft made an investment.

"In a way, you could say it might have been the craziest thing we ever did. But, you know, they've taken the foundation of great innovation, some cash, and they've turned it into the most valuable company in the world."

The 1997 deal came within weeks of Apple facing bankruptcy and was announced as part of a broad patent cross-licensing agreement and a promise from Microsoft to provide its Office software to Macs in exchange for Internet Explorer being the default browser on Apple's machines. In reality, it was a move to make Microsoft look competitive and not be penalised for monopolising the market.

For millennials who couldn't possibly comprehend a world where Apple didn't rule it was a period of PC boom and Microsoft was the big fish. Apple were worth less than $3bn (£1.95bn) and lost more than $1.5bn (£976m) in the year before Microsoft stepped in.

While Microsoft thought the $150m investment was a smart legal move to help a potential dead duck who posed no threat, they didn't count on the likes of Steve Jobs.

By far the best move Jobs ever made was striking this deal, which allowed Apple to keep the wolves from the door and create breathing space to nail down its flapping Mac business and transfer that success into the iPod. From here Apple moved from strength to strength with the creation of the iPhone and iPad, which revolutionised personal computing habits and swept the leg out from under Microsoft. The rest is history.

How much is Apple worth?

Microsoft execs might want to look away now. Apple was worth less than $3bn (£1.95bn) when it took Bill Gates' money and now it's worth $700bn (£455bn), on course to becoming a trillion-dollar company – something that eclipses Microsoft's relatively lowly $247bn (£160bn).

Ballmer saying this is probably the craziest thing Microsoft ever did is somewhat of an understatement. Of course, had this been any other company things may have worked out very differently and we may all have been using Microsoft Zunes, but Steve Jobs' vision and the design of Jony Ive deserve the credit for being instrumental in Apple's success.