A suspected teenage gunman returned to class Tuesday after allegedly shooting a fellow student multiple times just outside a Northern California high school, authorities said. The attack prompted an hours-long lockdown of more than 10,000 students and staffers in a complex with three schools in Santa Rosa.

Witnesses told police that the shooter fired three to four rounds before running onto the campus after classes began, authorities said. Officers later arrested the 17-year-old on suspicion of attempted murder in a classroom at Ridgway High School in Santa Rosa, north of San Francisco.

The victim, a 16-year-old boy, was in stable condition after being shot twice in the upper body on the sidewalk outside the high school.

Get Breaking News Delivered to Your Inbox

Santa Rosa Police Captain John Cregan said the incident followed a verbal altercation between the gunman and the victim, and that there was no active shooter-type incident, according to CBS San Francisco. Cregan said investigators believe the suspect hid the weapon in someone else's backpack and it was somehow transported it off-campus.

"We have no evidence the student who left with the backpack knew what they had [in the backpack]," said Cregan.

Authorities initially said the shooter had an accomplice, but Cregan said the person who had been detained was released. Detectives were working to determine if the shooting was gang-related, he said.

Parents described the panic of getting text messages from their children and not knowing if they were safe. One mother, Cherie Posluszny, told the Associated Press that her 17-year-old daughter texted just after 9:40 a.m.

"Someone got shot," the first message said, according to the Associated Press, followed up a minute later by "I love you."

"Someone is at Ridgway," read the next message.

After Posluszny's daughter's phone stopped working, the girl found a friend's phone. Posluszny asked if she was OK.

"Not really. But I will be OK," her daughter responded. The girl told her mother that she spent hours lying on the cold floor hiding behind a teacher's desk with other students.

Posluszny said she worried about how this "new normal" was affecting children. "This is becoming routine. It's part of the culture now. These kids are also victims," she said as she raced to the school.

The school is part of a sprawling complex that also includes Santa Rosa High School, Santa Rosa Junior College, school district offices and athletic fields. The complex with thousands of students, teachers, administrators and others was locked down while a SWAT team searched for the gunman, Cregan said.

TV footage from a helicopter showed a boy or man being led away in handcuffs while students were taken out of a building and searched.

Police, who are getting help from the FBI, lifted the lockdown around 11:30 a.m. following a "thorough sweep" of the schools, saying on Twitter that "there is no threat."

School district officials referred questions to police but tweeted that "students are safe."