An appeals court rejected a constitutional challenge to Florida’s “red flag” law, which passed after the 2018 mass shooting at Parkland’s Marjory Stoneman Douglas High School and allows guns to be removed from people found to pose a threat to themselves or others.

The ruling by a panel of the First District Court of Appeal came in a case in which the Gilchrist County Sheriff’s Office believed that one of its deputies, Jefferson Eugene Davis, posed a threat after he suspected infidelity by his longtime girlfriend. The sheriff’s office filed a petition for what is known as a “risk protection owner” and the removal of Davis’ firearms.