Ashurst and Slaughter and May have taken lead roles on a deal which will see supermarket chain Morrisons launch an online grocery service with Ocado next year.

Ashurst took the lead role for Morrisons on the deal, which includes a sale and leaseback of equipment at internet grocer Ocado's recently opened Dordon distribution centre in Warwickshire.

Morrisons will make an initial payment of up to £170m to acquire the Dordon base along with mechanical and handling equipment, as well as a licence and a handling fee. A further £46m will be invested to expand Dordon and establish a delivery network.

Ashurst global head of corporate Stephen Lloyd is leading the firm's team alongside fellow corporate partners Adrian Clark and Karan Dinamani, while Slaughters is advising Ocado with a team led by corporate partner Robert Stern.

Lloyd said: "This deal is really interesting because Morrisons is the only one of the 'big four' supermarkets that doesn't offer online services and it is the first to outsource this part of this offering. The deal is great for Ocado because it frees up capital and lets them use their uniquely sophisticated logistics and intellectual property to help Morrisons grow its business in a profit sharing venture."

Ocado also has a sourcing agreement with supermarket rival Waitrose which is due to end in 2017. The company will continue to deliver Waitrose food to customers, although the BBC has reported comments from Waitrose managing director Mark Price that he will "look really closely… to see whether there is any breach of the agreement we have." Hogan Lovells is acting for Waitrose, although the firm declined to comment.

The deal is expected be completed in the next six to eight weeks, subject to agreement by Ocado's shareholders.

Other law firms which advise Morrisons include Wragge & Co, which earlier this year acted on its purchase of 49 Blockbuster stores from the administrators of the collapsed DVD and video games rental company.