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.Highlighting the shifting views toward the food-delivery businesses, Just Eat is exploring ways to offload Grubhub roughly two years after paying $7.3 billion to acquire it. The industry’s prospects have been badly bruised as pandemic restrictions have lifted and demand for restaurant delivery has diminished. Labor shortages and increased government regulation have added new costs. In a recent research report, analysts at Berenberg Bank estimated that Grubhub would fetch less than $1 billion in a sale. Just Eat, the largest food-delivery platform in Europe, said it would continue exploring a partial or full sale of Grubhub amid pressure from investors to improve its business. Grubhub controls about 13 percent of the U.S. meal delivery market, versus nearly 60 percent for DoorDash and 24 percent for Uber Eats, and Grubhub records lower sales per customer than its main rivals, according to Bloomberg Second Measure. Just Eat’s stock is down more than 60 percent this year, even after a big jump on the Amazon news on Wednesday.Amazon also owns a stake in Deliveroo, a struggling British food-delivery service whose shares are down about 50 percent this year. Delivery Hero, another European food-delivery firm, has seen its stock price fall more than 60 percent. Shares of Uber and DoorDash are down nearly 50 percent this year.