SAS soldier-turned-thriller writer Andy McNab is set for a windfall after selling the e-book company he founded five years ago to supermarket giant Tesco.

Mobcast, set up by Mr McNab and chief executive Tony Lynch in 2007, provides a platform for companies to sell e-books and currently works with mobile network Orange.

Tesco bought the company, which is headquartered in the East London Tech City area, for £4.5 million to strengthen its own digital entertainment offer.

The country's biggest grocer bought the movie and television streaming service blinkbox last year and personalised internet radio service WE7 in June.

Bravo Two Zero author Mr McNab said: "As an author, I always thought the ability to carry your library around and read on all your personal devices would be a huge benefit to all. We have developed a product that makes this possible, and being acquired by Tesco ensures that this original vision will be available to as many people as possible."

Mobcast has a catalogue of more than 130,000 of the UK's most popular titles which can be bought and read on smartphones, tablets and e-readers.

The company offers an online cloud-based service that lets customers build up an e-book library collection without being locked into one single device.

Tesco, which already sells e-books through a third-party provider on its website, has endured one of the most challenging periods in its history after it issued its first profit warning in 20 years.

Its stock is still some 10% lower than before the warning at the start of the year, as its market share has been chipped away by cheaper rivals such as Aldi and Lidl. Chief executive Philip Clarke unveiled a £1 billion plan to improve customer service and a relaunch of its own-brand ranges, as well as investment in its website.

Sainsbury's has also made advances in the digital entertainment sector after it signed a deal with Rovi Corporation to provide a new digital video service for its microsite Sainsbury's Entertainment. In June, Sainsbury's purchased HMV's stake in e-book business Anobii for £1.