A student fired shots inside a high school and held three students hostage for over an hour before he was taken into custody Friday morning, authorities said. No one was injured.

The 17-year-old student initially took about 30 students hostage in a band room at Las Plumas High School around 9 a.m., said Police Capt. Jerry Smith. He quickly released most of them, but held three students for about an hour longer before he was arrested, Smith said.

The gunman's only demand to deputies during the standoff was that they "back off," he said.

A message posted on the Oroville Union High School District Web site said all six schools were locked down until the standoff ended. Smith said the teenager fired numerous shots at random from a handgun.

Oroville is 65 miles north of Sacramento.