A federal appeals court ruled on Tuesday that airport officials had the authority to kill migratory birds that posed a threat to planes at Kennedy International Airport.

In 2013, reports that the Port Authority of New York and New Jersey authorized the extermination of snowy owls, resulting in three of them being killed with a shotgun, led to a public outcry and a petition with thousands of signatures. It also prompted a lawsuit brought by an animal advocacy organization, Friends of Animals, that sought to alter the policies of the federal agencies that oversee bird removal.

The group said in that lawsuit that some bird killings were necessary to protect public safety, but they asserted that shooting snowy owls — large white birds from the Arctic tundra — was “wholly unnecessary.”

But in its ruling, the United States Court of Appeals for the Second Circuit upheld a lower court’s decision and found that federal permits could allow for the Port Authority to kill the birds when a plane and its passengers are endangered.