Dustin M. Mason, 18, was alone in the Talkeetna cabin when he thought he heard a bear outside. Several black bears had been seen in the area in recent weeks, said his sister, Shandi Mason.
Mason went onto the porch and drew his holstered .357 revolver, but did not see a bear.
Later, back in the cabin, he heard more bear noises. When he drew his gun from its holster again, the gun discharged.
The bullet entered Mason's thigh and shattered the bone.
His sister said he managed to drive his all-terrain vehicle nearly three miles to a neighboring fishing lodge.
Lodge residents contacted the Alaska Rescue Coordination Center. EMTs told them not to remove Mason from the four-wheeler.
"It might have caused him more injuries if they took him off the bike before the helicopter came," said his sister.
Mason was taken to Alaska Regional Hospital, where he underwent surgery to install a metal plate in his leg. He was expected to be released from the hospital this week.
Both Mason and his sister were born in Alaska and spend each summer visiting their father.