David Conrad, 51, alleged fired a BB gun at a mosque next to his Illinois house.

Police say they've arrested a man who lives near a mosque in Morton Grove, Illinois, for firing a pellet rifle at the mosque Friday night while 500 people prayed inside.

In a statement sent out Sunday, police said 51-year-old David Conrad of Morton Grove, who lives near the Muslim Education Center, faces felony charges.

The statement released by Morton Grove Police Cmdr. Paul Yaras said Conrad faces three counts of aggravated discharge of a firearm and one count of criminal damage to property. It also said a high-velocity air rifle outfitted with a scope was seized.

For more, visit NBCChicago.com

The shooting happened while worshippers were celebrating the holy month of Ramadan at the Muslim Eduction Center, 8601 N. Menard Avenue, about 10:30 p.m., according to Kamran Hussain, Vice President of the Muslim Community Center of Chicago, which owns the mosque.

Off-duty Chicago police officers, who had been hired to provide additional security at the mosque during Ramadan activities, called Morton Grove police after they saw an object whiz by and hit the building just above the head of one of the officers, Hussain said.

Though the damage to the building was minor, there were about 500 people inside the mosque for prayers at the time of the shooting, Hussain said, adding that many kids from the congregation were outside of the building during the service. No one was injured.

Around the same time, one of the guards saw someone firing a BB gun, with the shots coming from the home of a man who had previously spoken out against expansion of the school and mosque, Hussain said.

Conrad’s home abuts the mosque parking lot, which has been cause for a number of disputes between the building’s owners and the neighbor, Hussain said. He has lived there for about 12 years.

“He’s always been a thorn in our side,” Hussain said.

The BB gun used in the shooting was described as a rifle-type gun with a scope attached, Hussain said.

A U.S. Attorney, Morton Grove police and members of the FBI examined the building Saturday morning as the scene of a possible hate crime, according to a release about the incident from the Chicago office of the Council on American-Islamic Relations.

The Council on American-Islamic Relations’ national headquarters issued a community safety advisory for mosques earlier this week following crimes targeting Muslims in Missouri and Rhode Island, as well as the mass shooting at a Sikh temple in Wisconsin.

Conrad will appear in court for a bond hearing on Monday.

More content from NBCNews.com:

Follow US News from NBCNews.com on Twitter and Facebook