AUGUSTA — A man accidentally shot himself in the leg with a new handgun on Friday afternoon, police said.

Lt. Christopher Massey of the Augusta Police Department said the 26-year-old man, who he didn’t identify, had friends over at his Riverside Drive home and the gun went off, just before police and rescue units were called there at 4:26 p.m.

“He was showing them and somehow the thing went off, as they do when they’re new and you’re not familiar with them,” Massey said.

Massey said the man was taken to the Alfond Center for Health in Augusta, but transferred quickly to Maine Medical Center in Portland, though Massey didn’t think the wound to his leg was life-threatening.