Two years after buying Eat24, Yelp has agreed to sell the food ordering service to GrubHub for $287.5 million in cash — a little more than double what it bought the company for. In the process, Yelp and GrubHub have entered into a new partnership that will allow Yelp users to order through GrubHub, and vice versa.

The sale, which still faces regulatory approval, means that Yelp is getting out of the operational end of the food delivery market, opting instead to let GrubHub handle that side of the business. However, the partnership, which involves an undisclosed revenue split between the two companies, means that Yelp users now have access to the 55,000 or so delivery listings GrubHub hosts. GrubHub, on the other hand, gains the 15,000 or so listings that were previously exclusive to Yelp, for a combined 75,000 restaurants around the country. The deal will be in place for at least five years, Yelp says, so that its users have a way to place orders without jumping over to another app.

GrubHub is gaining even more influence over restaurants

While Yelp denies that it’s getting out of the food delivery business, there is an uncertainty in the market now that GrubHub controls such a vast ordering and logistics network. Eat24 was never much competition to GrubHub, primarily because the latter company owns Seamless, AllMenus, and MenuPages, accounting for some of the best known food ordering services in the US. And while plenty of other companies have tried to get in on the action — like startups DoorDash and Postmates, Uber, with its UberEats program, and now Amazon with its Amazon Restaurants initiative — none have made nearly as much of an impact on ordering as GrubHub’s companies have over the last decade.

So even though consumers don’t seem to have been using Eat24 that much — and restaurants have used whatever made sense to their businesses — the apparent downside to this acquisition is that GrubHub will own a majority of the food delivery market now that Yelp, one of the last remaining competitors, has partnered with it and sold off its operational arm. That’ll give GrubHub even more power over dining establishments, which may have to put up with increasingly onerous terms as a way to reach GrubHub’s massive user base.

News of the deal sent Yelp’s stock sky-rocketing nearly 20 percent in after-hours trading this afternoon, indicating investors viewed the sale, and the $200 million stock buyback program it comes with, as a more lucrative and less failure-prone strategy for tackling the costly and complex food delivery market.

Correction: An earlier version of this article said that Yelp was “getting out of the food delivery business.” That is not entirely accurate; Yelp has exited the operational side of the food delivery business, but it’s also entered into a partnership with GrubHub to let users order from a joint list of restaurants through either service’s website and mobile app, with an undisclosed revenue split between the two companies. The headline of the article has been updated to reflect this fact.