Online sales drove the bulk of Target Corp.'s growth during the holidays, but the retailer had to work for it.

The Minneapolis-based company offered free shipping, a sitewide 15 percent off deal on Cyber Monday and other promotions that helped boost its online sales 34 percent in its fourth quarter. That drove Target's comparable sales up 1.9 percent, a better performance than competitors such as Wal-Mart and Macy's.

The trade-off, though, was the heavy discounts cut into margins.

"I think that's the price they had to pay to get back on track," said Ben Marks, president of Minnetonka-based Marks Group Wealth Management, which invests in Target.

Wall Street mostly shrugged it off as Target executives gave a better outlook for sales and profit in the coming year. Target's stock rose 4 percent.

"Given what we're seeing across other department stores and other apparel-related retailers, Target's numbers really stand out, especially compared to Wal-Mart," said Brian Yarbrough, an analyst with Edward Jones. "It's pretty impressive."

Last week, Wal-Mart reported 0.6 percent growth in comparable stores in the U.S. and an 8 percent gain in digital sales. It forecast flat sales for 2016.

Yarbrough also gave Target high marks for invigorating the assortment with more compelling merchandise and displays in areas such as apparel and home decor. "You're seeing exciting merchandise at good values, which is driving the brand again," he said.

Target's home business grew 4 percent in the quarter, leading to its strongest annual performance in more than a decade. Toy sales grew by double digits, buoyed by "Star Wars" offerings. And its recently redesigned Bullseye's Playground, the budget-focused area near the front of stores previously known as the One Spot, saw sales soar more than 25 percent.

While other retailers saw a dip in apparel sales during the holidays due to the warmer weather, Target did not see a similar drop, a fact executives attributed to improvements in style and quality.

"We really believe our playbook that we rolled out during the holidays drove traffic to our stores and drove traffic to our site," Chief Executive Brian Cornell told analysts during a conference call.

Target last week launched a new kids' home collection, called Pillowfort, and it will roll out a new kids' apparel brand later this year. The company is also working to improve its grocery department by adding more artisanal, organic and natural products.

The Minneapolis-based retailer earned $1.4 billion, or $2.32 a diluted share, in the three months ended Jan. 30. That's a turnaround from a loss of $2.6 billion, or $4.10 a share, in the same period a year ago when it faced sizable losses from its Canadian stores which it shuttered last year.

Adjusted for one-time charges and gains, Target earned $1.52 a share, in line with the company's forecast but slightly below analysts' expectations of $1.54 a share.

Revenue was $21.6 billion, down slightly from $21.8 billion, a drop Target said came partly because of the sale of its pharmacy and clinic business to CVS.

One question lingering on analysts' minds was whether the promotions drew new shoppers to Target or just shifted the spending from stores to online.

"I'm just wondering where some of this is coming from," said Amy Koo, an analyst with Kantar Retail.

While the discounts cut into profits, Target executives noted that the holidays are always a promotional time of year. They added that the more simplified approach to promotions resonated with shoppers. In recent years, some consumers have become turned off by the constant noise from retailers trumpeting sales and discounts that have made it harder to figure out what is an actual deal.

"This year, the results showed us that clear, compelling broad-based offers are appealing to our guests," said Cathy Smith, Target's chief financial officer. "This insight will inform our strategy as we work to further refine our promotional effectiveness in 2016."

Target executives will discuss more plans at a meeting with analysts and investors in New York next week.