Capital One Financial Corp. (NYSE: COF) has agreed to buy HSBC's credit card unit for approximately $32.7 billion, netting HSBC a $2.6 billion premium.

The deal, which is expected to close in the second quarter of 2012, relieves HSBC of $30 billion in credit card loans and store-branded credit cards. Capital One is paying an 8.75 percent premium on the receivables.

 It allows Capital One to continue to bolster its credit card division, while allowing for London-based HSBC to continue to cut costs and streamline efforts.

In early August, HSBC announced it was laying off 30,000 employees, as well as selling 195 branches in New York to First Niagara for $1 billion. It's been a part of HSBC CEO Stuart Gulliver's plan to save $3.5 billion.

 "This transaction shows that Gulliver is executing his strategy, easing doubts in the market," Dominic Chan, an analyst at BNP Paribas SA, told Bloomberg News. "HSBC can redeploy the freed up capital to emerging markets and U.S. commercial banking."

Capital One has been on a spending binge lately, recently agreeing to purchase ING Direct's American online banking operations for $9 billion.

At an hour before the markets closed, Capital One was trading up 2.43 percent to $43.28. HSBC (NYSE: HBC) was trading down 5.4 percent to $42.50.