The FBI has arrested a man accused of firing shots at a mosque with a high-powered rifle in Meriden and charged him with a hate crime.

The shooting at the Baitul Aman Mosque was reported on Nov. 15, just two days after the deadly terror attacks in Paris.

FBI agents arrested Ted Hakey Jr., 48, on Thursday. Hakey, a former U.S. Marine, lives at 380 Main Street, next door to the mosque. He appeared in federal court on Friday and was ordered held until a detention hearing on Monday.

No one was inside the mosque at the time of the shooting and no one was hurt. Members of the mosque discovered the damage and a bullet inside the building and called police.

The FBI began an investigation and found shell casings in Hakey's yard, according to the arrest affidavit.

During an interview, Hakey told investigators that he had fired his gun on his property in the early morning of Nov. 14 after returning home from a night of drinking at a bar in Wallingford. It was about six hours after the Paris attacks.

He said he was shooting at a wood pile and did not intend to hit the mosque, federal agents said in the affidavit.

FBI investigators examined Hakey's phone and found several texts and Facebook messages disparaging Islam and Muslims, according to the affidavit.

"Is Muslim season open yet? I'm in a target rich environment," one Facebook message from July read.

Federal prosecutors praised the work of the FBI, ATF, Connecticut State Police and Meriden Police that led to the arrest.

"This arrest should serve as a clear message that crimes of hate against individuals of any race, creed, gender or religious background will not be tolerated," FBI Special Agent in Charge Patricia Ferrick.

Hakey is charged with intentionally damaging religious property through use of a dangerous weapon. He faces a maximum of 20 years in prison and a fine of up to $250,000.