A teenager shot and critically wounded a 16-year-old student at school Thursday, then fled to a restaurant, where he put the gun to his head before surrendering, police said.

Police spokesman Sgt. Aaron Dunbar said the shooter appeared to be a student. He was arrested shortly after the attack at Roseburg High School.

The school went into lockdown after the shots were fired about 7:45 a.m.

The victim, whose identity has not been released, was shot twice in the abdomen and once in the chest. A bullet also grazed his left elbow, said Kathleen Nickel, spokeswoman for Mercy Medical Center.

He "is doing very well, better than can be expected considering the bullet wounds," said hospital CEO Vic Fresolone. He said surgeons had repaired intestinal damage caused by the most serious of the wounds.

The suspect was not immediately identified and no motive for the shooting was disclosed.

A nearby elementary school in Roseburg, a former southwest Oregon timber town of about 21,000 residents, was briefly locked down as a precaution.