Bank of America Corp. more than doubled its profits in 2012 -- with some help from the tax code.

What the bank calls “restructuring” of its non-U.S. operations yielded $1.7 billion in foreign tax credits, or 41 percent of the $4.2 billion the company reported in 2012 earnings, according to securities documents including the form 10-K it filed Feb. 28. While the maneuvers didn’t provide an immediate cash tax benefit for Bank of America, the foreign tax credits count toward net income under accounting rules.

The transactions and the bank’s decision to take some risk that the credits will expire unused indicate the sometimes contradictory incentives that companies have under the U.S. tax code’s treatment of income earned overseas.

Bank of America, the second-largest U.S. bank by assets, hasn’t explained in any detail the structure of the transactions or its reasons for generating foreign tax credits that it can’t use immediately. None of the other six largest U.S. banks reported similar tax credit transactions in annual filings for 2012, though Citigroup Inc. already had a larger stockpile of foreign tax credits, which increased during the year.

For Bank of America, the most likely explanation behind the foreign tax credits is that the bank had foreign income that had been previously taxed and later incurred losses, leaving it with relatively low cumulative profits and high taxes that accompany such income, said Richard Harvey, a tax professor at Villanova University’s law school in Pennsylvania. That’s a typical result after a financial crisis.

‘Rather Large’

“Obviously, the order of magnitude at BofA was rather large,” he said.

Jerry Dubrowski, a spokesman for Charlotte, North Carolina- based Bank of America, declined to provide details of the transactions beyond what the company has said in securities filings.

Multinational corporations are required to pay U.S. taxes on their worldwide income with a top rate of 35 percent. Companies can defer U.S. taxation until they bring profits home, and they can receive foreign tax credits for payments to other governments.

U.S.-based multinationals have been lobbying Congress and the administration to back a so-called territorial system that would exempt most foreign income from U.S. taxation. Bank of America supports such a system, Dubrowski said in an e-mail.