NIAGARA FALLS, N.Y. — Authorities in western New York say a police officer was wounded by friendly fire when another officer shot an attacking dog.

Niagara Falls police say two officers responded to a report of two pit bulls Tuesday morning. Authorities say the officers were able to secure the dogs. As the officers were returning the dogs to their owner, a third pit bull from the home got loose and attacked an officer.

The officer killed the dog with multiple gunshots to stop the attack. Officials say one of the bullets apparently ricocheted off the concrete porch and struck the other officer in his right thigh.

The officer wounded by gunfire and the officer bitten by the attacking dog were treated at a hospital and released.

Two adult dogs and three puppies have been removed from the home. An investigation continues.

This story has been corrected to correct the name of the location to Niagara Falls instead of Niagara.