Marks & Spencer is in talks with Ocado to form a joint venture that would give M&S a full online food delivery service for the first time, sending shares in both companies surging today.

M&S and the online supermarket pioneer released short statements saying there was no guarantee a deal would emerge.

The statements were issued after London's Evening Standard newspaper said M&S was set to pay up to £900m for a 50% stake in a combined retail business. 

The 135-year-old M&S is a mainstay of Britain's shopping streets, but has been struggling to cope in recent years with the rise of fast fashion, discounters and online shopping. 

The firm currently sells wine, flowers and clothes online, but does not offer a full delivery service for its upmarket foods.

This puts it at a disadvantage to rivals such as John Lewis-owned Waitrose and Britain's biggest supermarket Tesco. 

M&S shares jumped as much as 4.3% to a three month high of 306.2 pence on the news, while Ocado's shares leapt as much as 12.5% to a three week high of 997.2 pence. 

However, some analysts questioned whether M&S might be in danger of paying a large amount of money to join a highly competitive market too late.

For Ocado, however, analysts said news of the talks was a relief following a devastating fire this month at its flagship robotic distribution centre that hit its shares. 

Ocado, founded by three Goldman Sachs bankers 18 years ago, has been transformed in the last year after it struck major deals to sell its technology to international retailers such as US group Kroger and France's Casino. 

While the focus on technology has boosted its share price, the deal as mooted with M&S would enable Ocado to keep a stake in its British retail business rather than selling it completely to focus on tech deals. 

The cash from M&S would also enable it to invest further in the online distribution centres it is building.

The Evening Standard report suggested Ocado would use M&S as a supply partner for its British customers. 

Many of the products that Ocado currently sells are supplied by Waitrose, and it was not clear what the M&S talks would mean for that arrangement. 

Ocado's deal with Waitrose ends in September 2020 and the Standard said it had an 18-month break clause. 

Waitrose, which has built up an online food business in parallel with its partnership with Ocado, declined to comment.