The holiday season was never going to be easy for Target as it tried to boost foot traffic and keep up with competitors’ discounts.

But it was the vast data breach at the Minneapolis retailer in the heat of Christmas shopping season that really knocked the chain off its feet. And, the company said Wednesday, the hack may continue to have financial repercussions for months to come.

Target’s net income for the fourth quarter, ended Feb. 1, slumped 46 percent to $520 million, or 81 cents a share, from $961 million, or $1.47 a share a year earlier. Sales slid 5.3 percent to $21.5 billion. Same-store sales, a measure that strips out volatility by including only stores open more than a year, fell 2.5 percent.

The retailer had chugged along with “better than expected” sales during the first half of the quarter, CEO Gregg Steinhafel said in a statement. But then the company watched as “results softened meaningfully” after it announced the data breach just a few days before the final Christmas shopping rush, he said.

Wall Street had feared worse, with analysts on average estimating Target’s earnings per share at 80 cents, according to FactSet. As a result, Target shares rose 7 percent to $60.49 at the close Wednesday.

Target already has swallowed $17 million in net expenses due to the intrusion: $61 million in total costs offset by the effect of $44 million in insurance coverage.

The company said it had to pay to investigate the breach, offer free credit monitoring to affected customers, boost the number of workers in its call centers and replace its in-house payment cards and cover related fraud losses.

In the weeks after the disclosure, Target gave shoppers a 10 percent discount on purchases one weekend and sent executives to apologize before Congress.

The breach “may have a material adverse effect on future earnings,” according to the company, though it indicated that it is “unable to estimate future expenses” related to the security hole.

Target suggested that related costs down the line could come from claims made by payment card networks dealing with counterfeit cards and fraudulent payments, civil litigation from customers and banks, and more government hearings.

The breach was “the biggest drain” on earnings in the quarter for Target, according to a client note from Sandy Skrovan, U.S. research director at Planet Retail. A “very promotional holiday season and January clearances” probably also weighed down results.

The retailer entered the season — which some estimate accounts for 20 to 40 percent of the industry’s yearly earnings — after four straight quarters of traffic declines, Skrovan said.

“It really took the wind out of Target’s sails — and unfortunately sales,” Skrovan said. “The immediate consequence was a loss of shopper trust — and at a time when Target had already been struggling to lure shoppers through the doors.”

More in News

Thirty-six people — musicians, artists, students, lovers and friends — lost their lives on Dec. 2, 2016, in the fire that consumed the Oakland warehouse known as the “Ghost Ship.” Here are their stories.

A long-awaited plan to keep the Raiders in Oakland was announced late Friday by city and council officials. It includes a public investment of $350 million, pegged to the value of the Coliseum land and infrastructure improvements.