The deal also ends a long-running series of lawsuits between the two companies.

Microsoft will build a software Nook reader into the next version of Windows due to go on sale later this year or early in 2013. And the deal will give Barnes & Noble pole position when it comes to marketing books on Windows PCs.

Tying up with Barnes & Noble will give Microsoft an entry into the tablet market. The rival Amazon Kindle is the dominant Android tablet, Microsoft desperately wants to get a foothold in the market dominated by Apple’s iPad.

This isn’t Microsoft’s first foray into electronic books. The company had its own reader and electronic book store – both are now defunct.

It could be a smart move for both companies. Last week Barnes & Noble was a major player in a dying market, Microsoft was looking at the tablet boom from the outside.

There’s even something in the deal for die-hard Apple fans. Having Microsoft’s still-deep pockets fund an alternative tablet will fuel the kind of competition which keeps designers on their toes.