British retailer Marks & Spencer has agreed a joint venture with online supermarket pioneer Ocado that would give M&S a full online food delivery service for the first time, the companies said today. 

Under the deal M&S, Britain's best-known stores group, will buy a 50% share of Ocado's UK retail business for up to £750m. 

M&S said it will finance the deal from a rights issue of shares to raise up to £600m. It will also cut its dividend by 40% to "a sustainable level". 

M&S, a 135-year-old clothing and food retailer, is a mainstay of Britain's shopping streets but has struggled to cope with the rise of fast fashion, discounters and online shopping. 

The firm sells wine, flowers and clothes online, but does not offer a full delivery service for its food, putting it at a disadvantage to rivals such as Waitrose and Britain's two biggest supermarkets Tesco and Sainsbury's. 

Shares in Ocado closed 11.7% higher yesterday, while M&S shares closed up 3.2%, after talks between the companies were confirmed following months of speculation over a deal. 

The joint venture will mean Ocado ends a two-decade supply deal with up-market supermarket Waitrose which is owned by the John Lewis Partnership. 

Ocado's existing deal with Waitrose is due to end in September 2020 with Ocado required to give 18 months notice that it does not intend to extend the relationship. 

Waitrose confirmed that its commercial arrangement with Ocado will end in September 2020.