A man accused of talking about shooting President Obama in 2009 can get his gun collection back, a New Jersey appeals court said in a ruling released Tuesday.

John Brek was working as a security guard at Newark Liberty International Airport in October 2009 when he was overheard talking about how easy it would be to shoot the president, who was scheduled to arrive the next day. He also allegedly made racist comments about the president.

Brek initially was charged with making terroristic threats and weapons offenses, but he eventually pleaded guilty to harassment and served 30 days in jail.

Subsequently, a judge denied Brek, an avid hunter, the return of more than 70 weapons that had been seized from his house in Linden during the investigation.

It is a crime in New Jersey for anyone convicted of a felony to possess firearms. Though Brek's crime fell under the less-serious category of disorderly persons offenses, state Superior Court Judge Joseph Cassini III in 2010 ruled that post-Sept. 11 concerns took precedence.

"We live in a very different time and a very different world," Cassini said. "We don't engage in certain conduct involving words or acts that can be interpreted as threats to our elected officials, threats to our citizens, threats to the health, safety and welfare of everyone."

In its ruling allowing the guns to be returned, the three-judge appeals panel cited reports by two mental health professionals that found Brek was not a threat. It also noted that he acquired the guns legally and had the necessary permits.