(Reuters) - Kroger Co forecast full-year profit below Wall Street's estimates on Thursday as its investments to fend off Walmart Inc (>> Wal-Mart Stores) and Amazon.com Inc squeeze the grocer's margins, sending its shares tumbling almost 13 percent.

The owner of some 2,800 supermarkets, including Ralphs, Harris Teeter, Fred Meyer and Mariano's, will use benefits from lower corporate taxes to expand services like home delivery, curbside pickup and self-checkout under its broad "Restock Kroger" program to make shopping more convenient and affordable, trading off capital spending for profits.

Executives said they were accelerating investment planned for the 2019-2020 and forecast 2018 earnings of $1.95 per share to $2.15 per share, dipping below analysts' consensus target of $2.15 per share, according to Thomson Reuters I/B/E/S.

"You should expect gross margin to decline somewhat in 2018," Chief Financial Officer Michael Schlotman said on a conference call with analysts.

"We're positioning the company to start growing again" in 2019 and 2020, Chief Executive Rodney McMullen added.

Wall Street has not been patient since Amazon burst into the physical supermarket business with its $13.7 billion purchase of Whole Foods Market last year.

Kroger "offered more of the same tough medicine in its (2018) guidance, with a heavy dose of margin reinvestment implied," said MoffettNathanson analyst Michael Montani.

"Bears will seize on today's news as further evidence of the heightened competition and impact of rising wages befalling brick and mortar retailers in the Age of Amazon," Montani said.

The Cincinnati-based company also is refining its product assortment, pricing, marketing and customer service under Restock Kroger amid a brutal price war with rivals ranging from Walmart to German discounters Aldi and Lidl.

CEO McMullen said Kroger would not cede ground to those competitors, nor would it make the price war worse.

"We're not going to lose on price, but we're not out there trying to lead the market down," McMullen said on the conference call.

Kroger plans $3 billion of capital expenditures in 2018, in line with 2017. It also expects to close the sale of 800 convenience stores to British gas station operator EG Group for $2.15 billion later this year and use the proceeds to buy back shares and pay down debt. That sale is not included in its 2018 profit forecast.

Kroger's sales for the fourth quarter ended Feb. 3, rose 12.4 percent to $31.03 billion, topping analysts' target of $30.83 billion. Identical same-store sales were up 1.5 percent, edging past analysts' estimate of 1.45 percent, and the sales forecast for 2018 was roughly in line with expectations, a sign that customers are not abandoning Kroger.

Net earnings attributable to Kroger jumped 68.8 percent to $854 million, or 96 cents per share.

Gross margin was 21.9 percent of sales for the fourth quarter. Excluding fuel, the 53rd week and a credit and charge for last-in-first-out inventory accounting, gross margin decreased 31 basis points from the same period last year.

Kroger's shares had gained about 16 percent in the past six months before dropping 12.7 percent to $22.91 in midday trading.

(In second paragraph, this story adds dropped word, "will".)

(Reporting by Lisa Baertlein in Los Angeles and Nivedita Balu in Bengaluru; Editing by Peter Henderson, Sriraj Kalluvila, Saumyadeb Chakrabarty and Peter Szekely)

By Lisa Baertlein and Nivedita Balu

Stocks treated in this article : Wal-Mart Stores, Kroger, Amazon.com