A tree branch impaled a man's neck when he fell off his mountain bike. Above, a CT scan of the patient's neck, and an image of the patient before the branch was removed.

A mountain biker in New Mexico was lucky not to sustain a serious injury after he fell off his bike and had a tree branch penetrate his neck, his doctors say.

The 40-year-old man was biking off-road when he fell, and his neck was impaled by the branch. The man didn't attempt to remove the branch, but instead drove 20 miles (32 kilometers) to a hospital, said Dr. Lev Deriy, an assistant professor and anesthesiologist at the University of New Mexico, who treated the patient.

Once at the hospital, a CT scan showed the branch extended about 0.6 inches (1.6 centimeters) into his neck. [12 Amazing Images in Medicine]

The branch could have caused a serious injury if it had damaged a major blood vessel, nerve or the patient's airway, Deriy said. But the CT scan showed no major injury.

"The neck contains a lot of very important, vital structures," Deriy told Live Science. The man was "lucky not to damage anything."

The man was also prudent not to try to remove the branch himself, which could have caused additional injury or increased bleeding, Deriy said.

"If you have something like that happen, it’s a good idea not to touch [the] foreign body," Deriy said. Instead, you should get to a hospital as soon as possible.

Surgeons removed the branch from the man's neck and closed the wound. The man was released from the hospital and has not experienced any complications from his injury, Deriy said.

Follow Rachael Rettner @RachaelRettner. FollowLive Science @livescience, Facebook& Google+. Original article on Live Science.