So the doctor borrowed a claw hammer from a worker to finish the job and sent Chandler home with a few stitches.

"He got a screwdriver at the same time, and he took the screwdriver and pried the nail up a little bit and got the claw hammer," Chandler said.

He said he feels "very, very lucky" to have escaped serious injury.

Dr. Arno Fried, chairman of neurosurgery at Hackensack University Medical Center in Hackensack, N.J., told FOXNews.com that the X-ray shows the nail went at least 2 inches into Chandler’s brain.

"It is high up on the brain and away from all of the major blood vessels, which is why [surgeons] probably chose to remove it the way they did," he said.

"It’s almost on the top of the head so they were probably confident that it didn’t hit any of the major vessels. This is not unreasonable as long as there’s good medical follow-up such as doing a CT scan after you’re finished to make sure there’s no bleeding in the brain."

Fried said nailgun injuries to the head are not uncommon and usually happen on construction sites or at home. In Chandler’s case, Fried said he would have opted to do a craniotomy in which the bone flap on the skull is removed to better access the brain.

"At Hackensack, we would have taken it out under direct vision so that we could make sure there was no damage or bleeding from the removal."