WASHINGTON (Reuters) - Bank of New York Mellon Corp (>> The Bank of New York Mellon Corporation) faced off against the U.S. government on Thursday in closing arguments over a $900 million tax benefit that the Internal Revenue Service called "tax abuse."

The case is the first to go to trial since the IRS accused some banks of generating artificial foreign tax credits through loans with London-based Barclays Plc (>> Barclays PLC).

The tax benefit stems from a $1.5 billion loan to BNY Mellon from Barclays Plc (>> Barclays PLC), which also helped several other U.S. banks generate billions in foreign tax credits. Barclays has not been accused of any wrongdoing.

Bank of New York's financing agreement "is just tax abuse tacked onto a pricey loan," Jill Frisch, attorney for the IRS, told U.S. Tax Court Judge Diane Kroupa.

The banks in question used foreign tax credits, which are given to U.S. companies to prevent them from being double-taxed by two countries for the same income. The banks call it a legal funding strategy; the government calls them sham tax shelters.

"No business willingly subjects its profits to double taxation on the same income," Bernard J. Williams, an attorney for Bank of New York, argued.

The bank has said that it may have to change its reserve for uncertain tax events by a net amount of up to $850 million depending on the outcome of the case, according to regulatory filings.

Each of the banks that got loans from Barclays say it advanced their core business. The banks paid below-market interest rates on the money, which was then subject to a series of complicated transactions.

Beside BNY Mellon, other U.S. banks that have borrowed from Barclays over the past decade include BB&T Corp (>> BB&T Corporation), and Wells Fargo & Co (>> Wells Fargo & Company).

A decision in the BNY Mellon case is not expected for several months.

(Additional reporting by Tim McLaughlin; Editing by Kevin Drawbaugh and Tim Dobbyn)

By Kim Dixon