Financial turmoil in the food-delivery industry is presenting new opportunities for Amazon.

The e-commerce giant struck a deal on Wednesday with Grubhub that allows Amazon Prime subscribers in the United States to forgo delivery fees on orders from certain restaurants, according to a statement by Just Eat Takeaway.com, the Dutch company that owns Grubhub.

The deal gives Amazon the option to purchase over a 2 percent stake in Grubhub at an undisclosed but negligible price, the statement said. Amazon can also buy an additional 13 percent stake in the company at an unspecified “formula-based price,” which depends on Grubhub hitting certain performance targets like adding new customers.

In 2021, Grubhub lost 403 million euros, or about $410 million. It said the Amazon deal would add to its earnings and cash flow starting next year. The agreement with Amazon automatically renews each year, unless one side decides to pull out.