A homemade bomb exploded on the campus of a Southern California school for foster youths Thursday morning, authorities said, but no one was hurt.

Deputies with the San Diego County Sheriff’s Department (SDSO), as well as CAL Fire officials, responded to San Pasqual Academy in Escondido around 9:15 a.m. after getting word of a reported threat to the school.

San Diego County Director of Communications Michael Workman told NBC 7 a student made some sort of bomb and the contraption exploded at the school. No one was injured, officials said.

He said the school was on lockdown for a period of time Thursday morning while officials swept the campus for any other potential threats.

Ultimately, the school was deemed safe. As of 10:50 a.m., students were in the auditorium being briefed on the situation, Workman said.

The incident remains under investigation. Officials said a 15-year-old male student at the school was detained on campus for allegedly making the device. He was booked into Juvenile Hall for possession of a destructive device.

Workman said that after an initial investigation, the homemade bomb appeared to be made out of bathroom products, including toilet bowl cleaner and some sort of aluminum foil. SDSO Sgt. Tom Vrable said the device was placed within a plastic soda bottle.

Deputies said this type of homemade device is more commonly known as a "pressure" or "acid bomb."

SDSO officials said a staff member at the school spotted the device and picked it up in front of the teenage student accused of making it. The teen suspect warned the staff member to get rid of it, as it would explode.

Vrable said the staff member quickly tossed the bottle into nearby bushes and a few minutes later, the bomb exploded.

Although no one was injured, SDSO bomb arson investigators said the bottle bomb was dangerous and someone could've gotten hurt if the school staffer hadn't thrown the device into the bushes.

One official told NBC 7 the detonation times on these kind of homemade devices vary "anywhere from 10 or 15 seconds all the way to five minutes."

"They are very unpredictable; very dangerous," the officials added.

San Pasqual Academy is a residential education campus for foster youths located on more than 200 acres in Escondido at 17701 San Pasqual Valley Rd.

Students are 12 to 18 years old and need stable, long-term placement and guidance, according to the school's website. The Academy opened in October 2001 and has a capacity to serve 184 youths.