(Reuters) - Kroger Co fell short of Wall Street estimates for quarterly same store sales on Thursday as fierce competition from Walmart Inc and Amazon.com Inc worked against the billions the supermarket chain has spent improving stores and its online offering.

FILE PHOTO: The Kroger supermarket chain's headquarters is shown in Cincinnati, Ohio, U.S., June 28, 2018. REUTERS/Lisa Baertlein/File Photo

Shares of the Cincinnati-based company fell more than 2% in early trading after sales at established stores rose just 1.5%, excluding fuel, below a consensus estimate of 1.78%, according to Refinitiv IBES data.

Analysts said the soft numbers showed the company was struggling to attract shoppers despite slashing prices to keep up in a crowded U.S. grocery market.

“With the U.S. economy doing really well, particularly with the middle-income consumer, which is Kroger’s consumer ... the very tepid same-store sales growth has got people pretty nervous,” Scott Mushkin, an analyst with Wolfe Research said.

Under its “Restock Kroger” program, the company has been highlighting private label brand display, rearranging store layouts and expanding services such as home delivery and self checkouts.

It has also invested in expanding its online business and improving its Kroger app. The initiatives powered a 42% jump in digital sales in the first-quarter ended May 25.

Gross margin, however, fell 40 basis points to 22.22%, hurt by its low-margin pharmacy business.

“The challenge is, the benefits of the ‘Restock Kroger’ program appear to be outweighed by the challenges the company is seeing (in) the competitive environment,” Mushkin said.

Walmart last month reported its best first quarter same-store sales growth in nearly a decade.

Kroger maintained its profit and same-store sales forecast for the year even as it topped expectations for overall quarterly sales and profit.

Excluding one-time items, the company earned 72 cents per share. Sales overall fell 1.2% to $37.25 billion, reflecting the decision to close its convenience store business.

Analysts had expected a profit of 71 cents per share and sales of $37.21 billion.