A Connecticut-area homeless man who was taking BB gun practice in the woods near President Obama’s motorcade was arrested yesterday, local officials said.

President Obama was speaking at the University of Hartford, when local police heard shots coming from the woods that ran alongside the president’s route to Bradley International Airport, Bloomfield police Capt. Stephen Hajdasz told the New York Post.

According to Hajdasz, a detective discovered the homeless man, identified as 27-year-old Joseph Stravinskas, holding a BB gun. The detective immediately ordered Stravinskas to drop the weapon.

“He was aiming it toward the woods, turned around and didn’t immediately drop it,” Hajdasz told the New York Post.

According to the Hartford Courant, Stravinskas then turned to face police, brandishing the weapon in their direction. He was then thrown to the ground and arrested, the New York Post reports.

Hajdasz expressed his relief that none of the responding officers opened fire on the 27-year-old. “[The BB rifle] was very realistic looking, like an actual rifle,” he said.

Apparently, Stravinskas, oblivious to the planned route of Obama’s motorcade, had set up cans in the woods and used them for target practice. Authorities believe that Stravinskas was unaware that President Obama was in the area.

So far, Stravinskas has been charged with breach of peace, threatening, and interfering with police. He was held on $15,000 bail last night, and will be arraigned in Hartford’s Superior Court later today.

While the suspect was in possession of a Virginia ID, police believe that he is homeless. It is believed that he was staying with friends near where he was arrested.