Marks and Spencer said it had paid online grocery retailer Ocado Group £750m to take a 50% stake in a new retailing joint venture between the two companies.
The venture would see Ocado provide an online delivery channel for Mark and Spencer's food business.
Marks and Spencer product would be available on the platform by September 2020, replacing Ocado's current sourcing agreement with Waitrose.
Ocado would receive £562.5m in upfront cash and a deferred cash payment of £187.5m, plus interest, payable five years after completion, depending on the satisfaction of certain financial and operational conditions.
'This is a transformative moment in the UK retail sector with the combination of two iconic and much-loved retail brands set to provide an unrivalled online grocery offer,' Ocado chief executive Tim Steiner said.
Marks and Spencer chief executive Steve Rowe said the deal would bolster its food business.
'I have always believed that M&S Food could and should be online,' he said.
'Combining the strength of our food offer with leading online and delivery capability is a compelling proposition to drive long-term growth.'