Three men are in custody after leading police on a nearly an hour-long chase through several southwest Miami-Dade canals.

Around 1:20 a.m. Thursday, a police officer who lives near Southwest 74th Street and Eighth Avenue heard gunfire and went outside to see what was going on. He traced the shots to a 12-foot boat in a nearby canal where he found three men reportedly armed with at least one rifle. The off-duty officer called in to police dispatch, according the police report.

When officers arrived and approached the boat, the men took off through the canals. Miami-Dade police sent up a helicopter and officers in the area assisted in the chase. Police officers in cars and stationed on bridges tried to stop the boat at several locations only to be fired on. Several officers fired back. None of the officers were hit.

The three men in the boat, Joseph Shephard, 37, Mark Hartman, 25, and Lee Hartman, 24 finally surrendered near Snapper Creek Drive and 112th Avenue. They were arrested and face different charges, including improper exhibition of a firearm, aggravated assault and “fleeing/eluding on a boat,” the police report said.

“These individuals were shooting at officers who were driving along the road. This is all a residential neighborhood that this occurred in,” said police spokeswoman Rosanna Cordero-Stutz. “They were putting the community in grave danger by shooting at the officers in such a manner.”

Neighbors in the area told CBS4 they were shocked when they learned what had happened.