(STOCKTON, Calif.) — A suspect has been charged with murder in the fatal stabbing of a 15-year-old girl at a high school in Stockton, California, in what officials said appears to be a random attack.

The student was killed when a trespasser, initially described as a man in his 40s, entered Stagg High School on Monday and stabbed her multiple times. Responders immediately began lifesaving measures, but she was pronounced dead at a local hospital, Stockton police said.

“A trespasser entered the front of our school today, stabbed one of our students multiple times,” Stockton Unified School District Superintendent John Ramirez Jr. said at a press conference Monday. “Unfortunately, she did not make it. The assailant was taken, was detained, and taken into custody immediately.”

“The school was also put on lockdown to assure the safety of the rest of our students,” he added. “We began to work with local law enforcement immediately and they’ve taken over the investigation.”

Anthony Gray, 52, was arrested in connection with the stabbing and booked into the San Joaquin County Jail on murder, police said late Monday.

“Detectives believe this appears to be a random act and they are trying to determine why this student was targeted,” the Stockton Police Department said on Facebook.

Gray is scheduled to appear in court on Wednesday. It is unclear if he has an attorney.

Officials had said Monday they did not have a motive for the attack but said the man was not a parent.

Ramirez praised the school’s resource officer for acting quickly to apprehend the suspect, saying it helped to prevent the stabbing from continuing.

“When the incident happened, there were staff immediately there,” he said. “It had been so quick that they weren’t able to stop it, but they were there immediately.”

Copyright © 2022, ABC Audio. All rights reserved.