Morrisons has had a torrid time of late Reuters

British supermarket chain Morrisons is partnering with online food retailer Ocado Group to enter into online grocery market from January 2014.

The companies entered into a 25-year deal after months of discussions. The agreement comprises of a technology and services arrangement and a sale and leaseback of property and equipment at Dordon.

Following the announcement, Ocado shares gained more than 30% in the morning, and are currently trading at 260 pence, up 28.8%. Morrisons is trading at 287 pence, up 1.6%, as at 10.05 a.m.

The website and delivery vans will carry Morrisons' name, while Ocado will provide logistical support for the venture from its Dordon distribution centre in the Midlands. Morrisons will pay an initial amount of £170m ($259m, €201m) to acquire the distribution centre. In addition, the company will pay £46m to expand the distribution centre and to build a delivery network.

Morrisons expects a return on its investment within three or four years. In 2013, the company anticipates further £25m development costs, while total capital expenditure is expected to increase by £100m to £1.2bn. Debt would reach at £2.7bn at the year-end.

The company's move was due to criticism that it was too slow to react to changing shopping habits. Its rivals Tesco, Asda and Sainsbury's were all having an online division.

"The agreement will enable Morrisons to enter the online grocery market quickly with a profitable business model," the company said in a statement.

"This industry leading customer proposition combines Morrisons affordable fresh food - much of it from the Company's own manufacturing facilities - with Ocado's leading end-to-end technology, logistics and distribution operations."

Meanwhile, Ocado noted that the deal would support "the internationalisation of our model as well as the growth of our UK business by increased market use of our operating model, enhancing capital efficiency and improving returns."

Ocado has already inked a deal with Waitrose to deliver the supermarket's products exclusively. Ocado said that the new agreement would not affect the current contract with Waitrose.

"We will continue to source products under our long term agreement with Waitrose and our customers will continue to benefit from the existing high levels of service, wide range of products and competitive prices that they currently enjoy," Ocado CEO Tim Steiner said.