New York CNN Business  — 

Less than a month after Uber tried and failed to buy Grubhub, the ride-hailing company has won a different deal to bolster its food delivery business.

Uber (UBER) said Monday it has agreed to buy Postmates for $2.65 billion in an all-stock deal, calling the startup “highly complementary” to Uber (UBER) Eats, its meal delivery service.

“Uber and Postmates have long shared a belief that platforms like ours can power much more than just food delivery — they can be a hugely important part of local commerce and communities, all the more important during crises like Covid-19,” Uber CEO Dara Khosrowshahi said in a statement Monday.

The deal, which is subject to regulatory approvals, is expected to close in the first quarter of 2021. Uber said it is “committed to provide bridge financing to Postmates” as it waits for approvals.

Shares of Uber were up 5% in early trading Monday following the news.

Postmates is considered a pioneer in the on-demand delivery industry, but it is one of the smaller competitors in the US market. In May, the startup earned 8% of meal delivery sales in the US, according to analytics firm Second Measure. DoorDash, which acquired premium restaurant delivery service Caviar last August, is the US leader in terms of sales, with a 44% share.

Postmates operates in thousands of cities across the US and has a strong presence in big markets including Los Angeles, Las Vegas, San Diego and Phoenix. It has partnered with a number of trendy brands like Sugarfish and has 10 million active customers.

“We’ve always admired Postmates, I guess, begrudgingly from afar in that it was a competitor who was able to compete aggressively and to be a leader in some very important markets with a much smaller capital base than a lot of its competition, including ourselves,” Khosrowshahi said on a conference call Monday to discuss the deal.

Khosrowshahi said that Postmates has been able to use technology to group together orders efficiently in its popular markets.

Uber, which started as a ride-hailing service, has long dabbled in other categories, including meal deliveries with its Uber Eats service. But those efforts have arguably taken on new urgency as the pandemic has simultaneously cut demand for its core rides business while leading to skyrocketing demand for meal deliveries.

Uber Eats has been viewed as a bright spot for the company, especially as people increasingly stay at home.

“At a time when our Rides business is down significantly due to shelter-in-place, our Eats business is surging,” Khosrowshahi said on the company’s first quarter earnings call in early May. Khosrowshahi said the company’s rides business was down about 80% in the month of April.

Uber faces an enormous problem as it looks to bet more on food delivery: The market is incredibly crowded. That could make it harder – and more costly – for Uber to gain ground.

Last month, Uber lost in its bid to buy Grubhub to a Netherlands-based company, Just Eat Takeaway.com, whose offer valued Grubhub at $7.3 billion. DoorDash announced it raised $400 million in new financing, valuing the company at nearly $16 billion. Meanwhile, grocery delivery startup Instacart raised $325 million, bringing its valuation to nearly $14 billion.