Just Eat Takeaway.com NV agreed to sell its 33 percent stake in Latin American joint venture iFood to Prosus NV for as much as 1.8 billion euros ($1.8 billion).

The deal fulfills a pledge to investors and will bolster Just Eat’s balance sheet, albeit at a price below a previous offer for the shares. The company said last year that a 2.3 billion-euro offer for its iFood holdings was inadequate.

“A year later, and it has accepted a material haircut,” Jefferies analyst Giles Thorne wrote in a report. “While it probably would rather have kept the stake, the ‘corporate finance’ benefits of the sale were obviously too big to ignore.”

After pandemic lockdowns drove a surge in orders for food delivery companies, they have had to contend with a slowdown in growth amid easing restrictions. They’ve been challenged by rising inflation biting consumers and a shift in investor appetite away from loss-making tech companies.

Prosus has been in talks to increase its ownership of iFood as far back as 2020, Bloomberg News reported at the time. It will fully own the Brazilian food delivery company following the transaction.

Prosus will pay 1.5 billion euros in cash when the deal closes and as much as an additional 300 million euros will be paid in the next 12 months depending on the company’s performance, Just Eat said in a statement. The deal is expected to close in the fourth quarter.

Just Eat said it will use the proceeds to strengthen its balance sheet and repay debt, and the company said it’s also still pursuing a partial or full sale of its Grubhub business. The Amsterdam-based company is looking for ways to cope with slowing order growth that’s hit the delivery industry this year.