FILE PHOTO: A sign marks a Fidelity Investments office in Boston, Massachusetts, U.S. September 21, 2016. REUTERS/Brian Snyder

BOSTON (Reuters) - Fidelity Investments on Wednesday won its court battle with the U.S. Internal Revenue Service over tax credits for the production of chemically treated coal.

U.S. Tax Court Judge David Gustafson ruled at a court hearing that a partnership led by Boston-based Fidelity was bonafide in its pursuit of generating tax credits from the production of treated coal.

The case has been closely watched by Wall Street firms and other corporations because the production of chemically treated, or refined, coal generates more than $1 billion a year in tax credits.[nL2N259128]

At the hearing Gustafson said he disagreed with IRS arguments that Fidelity and its partners faced insignificant downside risk on their investment in refined coal facilities. The judge said the partnership endured prolonged facility shutdowns due to permitting problems and environmental contamination, for example.

Fidelity had invested in the production of refined coal at three South Carolina power plants to qualify for tax credits that could total up to $330 million over 10 years. The coal is treated with chemicals to cut mercury and smog pollution.

Fidelity’s partners included insurance broker Arthur J. Gallagher & Co and Schneider Electric SE.

The IRS had disallowed millions of dollars in tax credits and claimed losses reported by a Fidelity-led partnership in 2011 and 2012. The IRS said the partnership was only created to “facilitate the prohibited transaction of monetizing refined coal tax credits.”