Macy's and Best Buy are expanding their same-day delivery offers as they try to be more competitive with online leader Amazon.

The nation's largest consumer electronics chain, Best Buy, says it will expand to 27 metropolitan markets from 13 starting next week. That number should reach nearly 40 cities by the winter holidays. In a separate announcement, Macy's Inc. says it will offer same-day delivery in 15 additional markets for a total of 33 areas.

Macy's is working with Menlo Park, California-based startup Deliv, backed by United Parcel Service, while Best Buy is now working with two companies including its original partner Deliv to handle the deliveries. Best Buy declined to name the new partner since it's still finalizing the deal. Macy's fee for the service is $8, while Best Buy has cut its fee to $5.99 per order from $14.99.

"We have always wanted to help our customers get their purchases from Best Buy how and when they want them," said Allison Peterson, president of bestbuy.com, in a company blog post.

Amazon offers members of its $99-a-year Prime program same-day and faster shipping options. It says members in more than 5,000 cities and towns can get their orders the same day or the next, depending on the item and location. Through Prime Now, members in more than 30 major cities can get tens of thousands of items in an hour or two.

Walmart has also jumped into the same-day delivery game, having said it's expanding its grocery delivery service with ride-hailing service Uber to two more markets -- Dallas and Orlando, Florida. The world's largest retailer had launched a pilot grocery service with Uber last year in Phoenix and then Tampa, Florida, earlier this year. The delivery charge is $9.95. It's also testing same-day delivery service with Deliv at Sam's Club in Miami.

With Deliv services, customers choose a delivery window directly from the retailer's website or mobile app. The stores charge their own fees; for same-day delivery those range from $5 to $8.

In May, Deliv unveiled Deliv Fresh, a service for grocers, meal services and e-commerce companies that sell perishable items. The company announced then that it would offer same-day, scheduled service for beer, wine, and spirits in June.