ELMA, Wash. -

The Fish and Wildlife Department says an agent on patrol was in the right location to help save a man's life after he accidentally shot himself in the leg with a black powder pistol.

Officer Mark James was on patrol this weekend in a remote area south of Elma where he saw the man shooting out a window at grouse.

KXRO reports when the man saw the officer, he began to unload the gun inside of his vehicle and the .22 caliber pistol went off.

James recently went through training for gunshot wounds and applied a tourniquet to stop the bleeding. The hunter was treated at Grays Harbor Community Hospital.

It is muzzleloader season and shooting grouse is legal, but shooting from inside a vehicle is illegal in Washington.