YARMOUTH, MA-  A police officer was shot with a flare gun in Yarmouth this past Thursday while pursuing a wanted man on-foot.

According to the Falmouth Patch, Kevin Cahoon was spotted by a police officer as he was riding a bicycle behind a building Thursday morning on Long Pond Drive. When the officer attempted to apprehend the 53-year old, both fell to the ground as Cahoon violently resisted arrest.

As the two men continued their fight on the ground, Cahoon reportedly fired a flare gun at the arresting officer. By coincidence, two off-duty police officers happened to be in the area just as the confrontation was unfolding, and were able to assist the Yarmouth police officer.

"Cahoon violently resisted arrest and during the attack...shot off a flare gun while on the ground actively resisting," said Yarmouth Police.

Yarmouth Police released a public bulletin earlier in the day, stating that Cahoon "will try to obtain a firearm and shoot when confronted, as he does not want to go back to prison."

Cahoon was charged with assaulting a police officer, assault with a dangerous weapon, and resisting arrest. Cahoon had a warrant out for his connection in the rape of a disabled person, as well as prior warrants for breaking and entering, indecent assault, and larceny from a building. Kevin Cahoon is a Level-3 sex offender which labels him as the "highest risk" to reoffend.

Both the arresting officer and Cahoon were hospitalized to treat their minor injuries.