Investment in new warehouses and IT systems have put online grocer Ocado into the red for the first half of the year.

The company recorded a £9m loss in the six months to June 3 compared with pre-tax profits of £7.7m a year earlier as it counted to cost of an accelerated expansion plan.

Underlying earnings also fell 13.9% to £38.9m for the half year.

But the recent FTSE 100 entrant said it had been a 'transformational period' after sealing a string of international deals, which has sent its shares soaring more than 260% over the past year.

Ocado said the stock market success was now set to see higher-than-expected bonus payouts for its top bosses, with around another £9m pencilled in for 2018.

Chief executive Tim Steiner said: 'This is a transformational period for Ocado.

'We have developed unique and proprietary technology to offer retailers an end-to-end operating solution for grocery retail that enables them to meet the changing needs of consumers.'

He added: 'In order to fully capitalise on the opportunities ahead of us, we are working at pace, investing more and focusing sharply on execution to bring on new capacity in the UK and to achieve successful outcomes for our partners.'

The half-year results showed retail earnings remained largely flat, edging 0.7% higher to £45.5m after investment in its new warehouse at Andover in Hampshire, with costs of a new site in Erith, south-east London, set to weigh on earnings in the second half.

But Ocado said retail earnings would start to 'improve significantly' over the remainder of its financial year as the benefits of the new warehouses start to bear fruit.

Earnings in its fast-growing solutions arm were hit by significant investment to secure its international tie-ups, with the division reporting an underlying interim loss of £2m against earnings of £400,000 a year earlier.

It warned that earnings in the unit would remain under pressure as it spends another £4m on its technology and the Ocado Smart Platform.

The group had already cautioned in February that investment would hit earnings this year, with spending set to surge to £210m.

Ocado, which works with Morrisons in the UK, has cheered investors with a series of deals - most recently signing up US giant Kroger in May.

It has struck similar agreements in Europe and beyond, and is developing customer fulfilment centres with retailers in France, Canada and Sweden.