BOISE, Idaho — A federal judge is holding the Atlanta Gold mining company in contempt of court for allowing arsenic and iron to enter a tributary of the Middle Fork of the Boise River.

Chief U.S. Magistrate Judge Ronald Bush released the decision on Friday, ordering the company to pay up to half a million dollars in fines and penalties if they don’t fix the problems by next year.

The Idaho Conservation League and Northwest Environmental Defense Center sued Atlanta Gold Corporation in 2011, alleging the company was violating the federal Clean Water Act when it discharged water containing pollutants from a horizontal mining tunnel — called an adit — into Montezuma Creek. That case resulted in a 2012 order directing the mining company to fix the problems.

The Idaho Conservation League asked the judge to find Atlanta Gold in contempt for failing to adhere to terms of the 2012 ruling.

“The situation at the adit has improved significantly compared to several years ago, in that Atlanta Gold has been able to treat the effluent water so that it meets all requirements of the permit about eighty percent of the time,” Bush noted in his ruling.

Still, the judge continued, water with more arsenic and iron than allowed is still entering the Boise River tributary, particularly in the spring and summer when water flows are higher.

Michelle Points, an attorney for Atlanta Gold, declined to comment on the ruling. The company has previously argued in court that it has done everything it can reasonably do to remove arsenic and iron from the adit waters and further compliance isn’t reasonably possible.

But the judge said that improvements can be made, though they will likely come with additional expense and logistical challenges.

“Sadly, the people of Idaho have seen this movie before,” Idaho Conservation League program director Justin Hayes said in a prepared statement. “Same company, same mine, same arsenic discharges to the same river — just five years later. The Boise River and the people of Idaho deserve better.”