Target Corporation (NYSE: TGT), the No. 2 U.S. discount retailer, said Tuesday it has agreed to sell its entire consumer credit card portfolio to Toronto-Dominion Bank (NYSE: TD), finding a buyer nearly two years after the retailer said it wanted to sell the business.

TD Bank will pay an amount equal to the gross value of the outstanding receivables when the deal closes. Right now, the gross value is about $5.9 billion.

In addition, the two companies have entered into a seven-year program agreement under which TD Bank will become the exclusive issuer of Target-branded Visa and private label consumer credit cards to Target's U.S. customers.

Target’s Chief Executive Officer Gregg Steinhafel announced plans to sell the credit card portfolio in January 2011 to use the cash to buy more stock and pay down debt.

Earlier this year, the Minneapolis-based Target (NYSE: TGT) temporarily suspended the planned sale of its credit card portfolio and agreed to pay JPMorgan Chase & Co. $2.8 billion to retire 2008 financing. The company added that discussions with potential partners would be revived later this year.

Target sold almost half its credit card loans to JPMorgan for $3.6 billion in 2008. The retailer said retiring the JPMorgan financing will help it market the portfolio, and it anticipates recouping some or all of the cost of the make-whole premium through lower expected interest expenses this year and in 2013.

Shares of Target Corporation (NYSE: TGT) fell 21 cents, or 34 percent, to $62.21 in Tuesday’s premarket trading.