Updated at 6:47 p.m. ET: A handcuffed Houston-area high school student shot himself in the head Wednesday while in the back of a police car, officials said.

The 17-year-old student was rushed to Ben Taub Hospital. He was in the intensive care unit after undergoing surgery, school officials said.

No one else was hurt.

The incident began when police were called to North Shore Senior High School in unincorporated Harris County to investigate a report of a student with a firearm, said Capt. Jon Moore with the Harris County Constable Precinct 3.

The student was searched, handcuffed behind his back and placed in the back of a patrol car but apparently still had a gun, Moore said.

The student then shot himself, Galena Park Independent School District officials said.

District spokesman Jonathan Frey gave the following account:

This morning at North Shore Senior High School, a student was arrested. He was searched, handcuffed, and placed in the back of a police car. While in the car, the student retrieved a hidden gun and shot himself. Paramedics were called and quickly arrived on scene. He was transported to the hospital still conscious when he left. His family accompanied him to the hospital. Students at North Shore Senior High School remain safe. Counselors are available for students as needed.

In a follow-up email to NBC News, Frey said the gun was apparently hidden well enough to evade detection when the student was frisked prior to being placed in the patrol car.

The Harris County Sheriff's Office will investigate the shooting, Moore said.

Watch the Top Videos on NBCNews.com

In July, an Arkansas man fatally shot himself while handcuffed in the back of a police car. Officials say Chavis Carter, 21, committed suicide even though he was handcuffed from behind and had been searched twice for weapons. He had been picked up by authorities during a traffic stop in Jonesboro, Ark.

More content from NBCNews.com:

Follow US news from NBCNews.com on Twitter and Facebook