Walmart is expanding its same-day grocery delivery service beyond the Bay Area to Colorado, adding more muscle to its battle against retail powerhouse Amazon.

Walmart launched grocery delivery in San Jose and San Francisco two years ago. With the westward expansion, customers in Denver and surrounding cities will be able to order online from tens of thousands of grocery items -- including fresh produce, meat and seafood, frozen food and bakery goods -- and have them delivered to their home during a two-hour window. Walmart uses its own refrigerated trucks to deliver the food.

The service is still in test mode, however, and is open to customers only on a first-come, first-serve basis. Customers must sign up online with their email address to receive an invitation.

Grocery delivery is a cornerstone of Walmart's quickly growing e-commerce business, which has expanded in recent months as the retailer has built up its Silicon Valley tech labs, where its online and mobile operations are created and housed.

But the same-day delivery scene is more crowded than when Walmart first entered in 2011. Bay Area startups such as Instacart and LolaBee's Harvest have popped up to offer online grocery shopping and delivery to customers' front doors. And last month, Google (GOOG) rolled out its same-day delivery service to the public, offering delivery from Whole Foods and Raley's to anyone living from San Francisco to San Jose.

Walmart's expansion is a challenge to Amazon Fresh, that company's grocery delivery service, which Amazon for the first time brought outside its home base in Seattle in June when it launched the program in Los Angeles. Amazon Fresh is expected to launch in San Francisco before the end of the year.

Walmart is also preparing to expand its same-day delivery service of general merchandise, a service it launched last year in parts of the Bay Area. The company recently announced it added two new large-scale centers for fulfilling online orders, one in Pennsylvania, which will open early next year, and another already in operation in Texas. The new fulfillment centers, the company said, will help Walmart deliver online orders faster to the customer's doorstep or to a nearby store, where customers can pick up the purchase.

Contact Heather Somerville at 510-208-6413. Follow her at Twitter.com/heathersomervil.