A federal court of appeals ruled that a lower court rightfully threw out a lawsuit that claimed the constitutional rights of scores of inmates in a mental and physical health wing at the Utah State Prison were violated in 2011 when they were exposed to tear gas deployed to subdue a single prisoner.

The decision was issued Friday by the U.S. 10th Circuit Court of Appeals.

On Aug. 3, 2011, inmate James Hill locked himself in a recreation yard at the Draper prison and started sharpening his glasses against the wall.

Hill threatened officers, saying he would “stick or cut the first pig that came out there,” the federal ruling states.

Prison guards devised a plan to drop tear gas in the yard, formed by three walls and a large intake unit that pulled fresh air from the yard and distributed it throughout the mental health wing.

“The plan went smoothly except for a significant problem — the HVAC [heating, ventilation, and air conditioning] unit,” the ruling states.

The unit pulled the tear gas into the vents and distributed it to the five sections of the wing, exposing more than 100 inmates to the harmful gas. While two areas of the wing were evacuated within a couple minutes, three others took 10 minutes to evacuate.

Following what the court ruled was an unintentional gassing, officer Robert Powell told inmates: “If any of you sissies absolutely need medical treatment, that’s fine, but if any of you are just going over there to whine and cry, something to that extent, or say, oh, my eyes hurt or something like that, I’m going to put you on lockdown or see about having you removed from this facility. I’m not going to have you wasting time with those complaints. If you’re about to die, that’s one thing.”

Warden Scott Crowther, Powell and officer Jason Nicholes were named as defendants in the lawsuit.

The appeals court ruled that Nicholes and Powell did not mean to expose other prisoners to the gas. It also ruled that the use of force was justified due to Hill threatening them and clearly showing no intention to obey orders when he said “F--- you, fascists,” to the guards.

The court also ruled that the gassing was an accident, in which case Powell and Nicholes, and the prison, are shielded by government immunity.