A 17-year-old gunman shot a schoolmate twice in the torso outside a high school in Santa Rosa, Calif., on Tuesday morning and then walked calmly into class, where his teacher did not realize anything was amiss, the police said.

“He pretty nonchalantly walked into class and was talking to friends,” Capt. John Cregan of the Santa Rosa Police Department said in an interview. “The teacher had no idea he had been involved in anything. He hadn’t been acting out or anything.”

The 16-year-old victim, meanwhile, crawled into a friend’s car and was driven to a hospital, where he was listed in stable condition on Tuesday afternoon.

The shooting, at Ridgway High School, began as a several-minute-long argument between the two young men before 9 a.m., Captain Cregan said. The episode was captured by surveillance video, he said, adding that some students also witnessed it and that a number might have recorded the shooting on their phones.