KANAB — A Kane County sheriff's deputy was shot through both legs when a .40-caliber handgun was accidentally discharged during a weapons certification Monday morning.

The bullet passed through the deputy's calves, but missed important tendons, arteries and bones.

"It looks like pretty much a miracle shot," Kane County Sheriff's Sgt. Alan Alldredge said. "It was nothing they had to do surgery on and nothing they had to keep him for, so they patched him up and allowed him to come home."

The incident is being investigated, Alldredge said. He would not specify whether the deputy was shot by his own weapon or someone else's.

The deputy, who has been with the Kane County Sheriff's Office for at least seven years, was participating in a routine qualification shoot at a law enforcement shooting range near Kanab when he was hit by the single shot, Alldredge said.

Officers are required to participate in the certifications three to four times each year.

The deputy was driven to the nearby Kane County Hospital, then transported by medical helicopter to Dixie Regional Medical Center. Once doctors determined he hadn't sustained any serious injury beyond tissue damage, he was treated and released.