Wal-Mart is launching a test of same-day delivery for online customers in the Twin Cities and three other metro areas.

The program, which started this week for Twin Cities residents, allows customers to choose from about 5,000 items, including toys, flat-panel TVs, iPads, sporting goods and video games, and have them delivered before the end of the day.

"This is about our long-term vision of dominating e-commerce," Wal-Mart spokesman Ravi Jariwala said. "By combining our website and our stores, it lets our customers shop anywhere and anytime they want."

Physical retailers have been trying to figure out how to turn their stores into competitive advantages. With their staffs, their inventory and their real estate, the stores have many costs that online retailers do not have to deal with.

Wal-Mart and several other retailers have started using the stores to offer services to online shoppers, including shipping items (but not same-day), free returns, order online and pick up in store and payment centers.

However, few mostly offline retailers offer same-day delivery, as few have enough locations to make it feasible, not to mention the cost and logistical hassle.

Wal-Mart's same day orders, which cost $10 for delivery regardless of the cost or number of items, will route products from local stores, not a warehouse, said Jariwala. That means each of the four markets has a slightly different assortment of products online, based on the stock from the stores.

The new program is an extension of Wal-Mart's popular site-to-store program, in which customers can save shipping costs by picking up an order in a Wal-Mart. Site-to-store sales account for nearly half of Wal-Mart's online sales, he said.

Of the markets chosen for Wal-Mart's test -- the Twin Cities, the San Francisco Bay area, northern Virginia and Philadelphia -- the Twin Cities is the only one that is not part of a same-day delivery program that Amazon offers.

Amazon has offered limited items, in limited areas, for same-day delivery since 2009. Now, though, it appears to be broadening its same-day goals. When it recently said it would add almost 20 warehouses this year, and agreed to start paying sales tax in some states, that generated speculation that Amazon was preparing to offer same-day delivery in major cities.

Wal-Mart is clearly responding to Amazon's strategy, said Anne Zybowski, a Kantar retail analyst. But she said it also chose the Twin Cities to be in Target's back yard.

Target does not offer a site-to-store program or a same-day delivery program, said Eddie Baeb, a Target.com spokesman.

With Wal-Mart's program, customers ordering from the website have until noon to make purchases and receive items the same day. They can choose a delivery window of 4 to 8 p.m., 5 to 9 p.m. or 6 to 10 p.m., available seven days a week via United Parcel Service.

The programs in the Twin Cities, Philadelphia and northern Virginia are different from the one in California, which is limited to groceries. They have a $45 order minimum, a $5 to $10 delivery fee, and are delivered via Wal-Mart-owned trucks, said Jariwala.

There is no plan to add groceries in the Twin Cities market, yet, he said.

The real test of Wal-Mart's program won't happen for about 10 weeks, said Zybowski. "Around Dec. 15, we'll see how good they are at managing inventory and keeping up with the orders," she said.

And what about the procrastinators who start their online shopping at Walmart.com on Dec. 23? "That's the ultimate test," said Zybowski.

Wal-Mart's program is expected to last through the holidays, although the company did not announce an end date.

The New York Times contributed to this report. John Ewoldt • 612-673-7633