NEW YORK - Amazon said Tuesday that it is closing its U.S. restaurant delivery service, a 4-year-old business that failed to take off amid fierce competition from Uber Eats, DoorDash and others.

The service, called Amazon Restaurants, offered delivery in more than 20 cities in the U.S. It expanded into the United Kingdom, but Amazon shut down the service in that country late last year. The closure of the U.S. business, which was first reported by technology news site GeekWire, will happen on June 24.

Still, Amazon.com Inc. has shown interest in delivering meals to diners' doorsteps. Last month, it bought a stake in British food delivery company Deliveroo, whose kangaroo logo is a common sight on bicycles and scooters in Britain.

Amazon Restaurants was a tiny player in the U.S., taking about 2% of the market, according to Jeremy Scott, a food and restaurant analyst at Mizuho.

He said Amazon didn't promote the delivery service enough and didn't have deals with big fast food chains. Uber Eats, for example, delivers Big Macs from McDonalds; DoorDash has a partnership with Wendy's; and Grubhub delivers Taco Bell chalupas and buckets of KFC's fried chicken.

With Amazon out of the business, analysts said others could pick up its business. Shares of Grubhub Inc. soared 7% Tuesday.

But Scott thinks Amazon isn't abandoning the business altogether.

“The shuttering of the platform doesn't necessarily mean that Amazon won't eventually invest in the space,” he said.