Online food delivery company Just Eat has agreed to buy rivals hungryhouse in Britain and SkipTheDishes in Canada, spending more than $300 million to strengthen its leading position in both markets.

The London-listed company said it would pay an initial 200 million pounds ($251 million) to buy hungryhouse from Delivery Hero, a Berlin-based company backed by Rocket Internet, plus an additional 40 million pounds based on performance.

Hungryhouse is an online food company operating solely in the UK. Just Eat said the deal is expected to boost its earnings per share (EPS) in the first full year of ownership.

In Canada, Just Eat said it would pay an initial C$110 million ($66.1 million) cash for SkipTheDishes, a delivery platform focused on lower density metropolitan and suburban areas which has 2,900 restaurants listed and 350,000 active customers.

Just Eat said it expects the deal, net of one-off exceptional costs, to be moderately dilutive to earnings per share in 2017 and 2018 before becoming EPS accretive thereafter.