Target Corp., the second-largest discount store in the U.S, has agreed to sell a 47 percent stake in its credit-car loans to J.P. Morgan Chase & Co. for $3.6 billion to raise cash for stock buybacks in a deal that was urged by activist shareholder William Ackman.

Target said the deal, expected to close this month, is expected to provide Target with sufficient liquidity to implement its business plans, including previously announced capital investment and share repurchase activity, without the need to access term debt capital markets again this year, the company said in a statement.

The retailer said it was examining a potential sale of the loan portfolio in September, two months after activist investor William Ackman revealed a stake in the company and urged steps to boost the stock price.

The deal represents the latest example of how J.P. Morgan is able to seek profits by taking on big new risks. Target said it expects the card portfolio to continue performing as planned, with a recent rise in losses being offset by changes in terms.

Target will continue to control all aspects of creating and implementing its financial services strategy, provided that future portfolio performance remains sufficiently strong, Target said. Alternatively, in the event that substantial unanticipated portfolio deterioration were to occur in the future, JPMorgan Chase would gain certain rights to direct Target's credit card team to implement alternative underwriting and risk management practices, until portfolio performance improved.