(Reuters) - Target Corp forecast 2019 profit above Wall Street estimates on Tuesday as investments to draw more shoppers online and in stores drove a jump in holiday sales, sending its shares up 5 percent.

FILE PHOTO - Shopping carts are seen at a Target store in Azusa, California U.S. November 16, 2017. REUTERS/Lucy Nicholson

Target beefed up its delivery offerings in the highly competitive holiday shopping season in a bid to get an edge over online behemoth Amazon.com Inc and brick-and-mortar rivals like Walmart Inc.

The Minneapolis-based retailer offered free two-day shipping on hundreds of thousands of items and widened its pick-up in store options for online orders.

Three-quarters of all online sales in the quarter were either picked up in stores or sent from local stores rather than warehouses direct to customers.

“This performance isn’t simply a reflection of a strong consumer environment,” Chief Executive Officer Brian Cornell said on a post-earnings call. “When you look at the results ... it is clear our strategy is working.”

The retailer also said it gained market share in all five of its core merchandise categories and highlighted toy sales, where it has benefited from the liquidation of Toys ‘R’ Us.

“We saw an obvious opportunity to pick up market share, and our teams aggressively chased the business, making big bets on toys and baby,” Cornell said.

“We finished 2018 with huge market share gains in each,” he added, without providing numbers on the gains.

Comparable sales, that include both in-store and digital sales, rose by a better-than-expected 5.3 percent while in-store traffic grew 4.5 percent, suggesting the company’s outlays on remodeling hundreds of outlets and opening smaller stores in college towns was bearing fruit.

“(The results) completely justifies the extensive investment Target has been making in its shops, which are now more engaging and inspiring places to visit,” GlobalData Retail managing director Neil Saunders said.

These investments have, however, hurt Target’s margins. In the quarter gross profit margin fell to 25.7 percent from 26.1 percent a year earlier, but were better than what analysts feared.

The company forecast fiscal 2019 adjusted profit between $5.75 and $6.05 per share, above analysts expectations of $5.61 per share, according to IBES data from Refinitiv.

Excluding certain items, the company earned $1.53 per share, a cent above analysts’ expectations.

The company’s total revenue fell marginally to $22.98 billion in the fourth quarter ended Feb. 2, as the year-ago quarter included an extra week, and edged past analysts estimate.