Target Canada is closing up shop. Target said Thursday that it will begin winding down its Canadian operations, which include 133 stores that employ 17,600 people.

The Minneapolis-based company said it reviewed its Canadian subsidiary's performance and concluded that it would not be profitable until 2021.

"This was a very difficult decision, but it was the right decision for our company," said Target CEO Brian Cornell.

The second-largest U.S. retail chain, Target (TGT) has struggled in Canada for years. The company said it will take a $5.4 billion pre-tax loss against earnings in the fourth quarter due to the shutdown in Canada. (See correction below.)

Despite its problems in Canada, Target's U.S. business is turning a corner. Target said U.S. sales and earnings will be better than expected in the fourth quarter, thanks to strong holiday sales and online shopping.

Cornell told investment analysts in a conference call that leaving Canada will let Target focus on revitalizing its core U.S. operations.

"I'm very bullish about the future prospects for our business in the U.S., but I also recognize that we have a lot of work to do over next few years," said Cornell.

Related: Inside America's dead malls

The retailer said closing its Canadian stores will increase earnings in the current fiscal year, and boost its cash flow in the years ahead.

Target Canada had been counting on a strong holiday season to help turn things around, but that did not materialize, said Cornell.

A Canadian high court has approved Target's plan to begin winding down the business. The court order authorizes $175 million in bankruptcy financing and $59 million in funding for employee severance.

Related: Time is running out for RadioShack

Overall, Target expects to pay between $500 million and $600 million to end its Canadian business. It says it has the cash to do so.

The Canadian stores will remain open during the liquidation process.

"There is no doubt that the next several weeks will be difficult, but we will make every effort to handle our exit in an appropriate and orderly way," he said.

Correction: An earlier version of this story incorrectly stated that Target expected to lose $5.4 billion in the fourth quarter due to the shutdown.