(ABC NEWS) — Investigators on Tuesday were trying to figure out what caused a homemade rocket attached to a skateboard to explode, killing a Southern California high school student and injuring his friend.

Bernard Moon, 18, of Thousand Oaks died after the blast Monday night. A 17-year-old had minor injuries and was released from the hospital Tuesday.

The two senior honor students were from Thousand Oaks High School. The blast took place in a courtyard at Madrona Elementary School in Thousand Oaks.

The teens were experimenting with a skateboard attached to a homemade rocket as an engine, authorities said. The rocket was about a foot long and three-quarters of an inch in diameter, Ventura County sheriff’s Capt. Garo Kuredjian said.

“It wasn’t meant to go up into the sky,” he said of the rocket. “It was meant to go horizontally to propel a skateboard.”

The blast appeared to be “a tragic accident,” he said.

It was unclear whether anyone was trying to ride the skateboard at the time, he said.

Details of the rocket’s design and the chemicals used were not immediately released.

Boy Scouts and Girl Scouts were meeting at Madrona Elementary when the school suddenly shook.

“Nobody could really discern what it really was because it was a huge explosion. It was just all at once. Just a ‘boom!’ ” Tammy Coburn, who was attending the meeting, told reporters.

A nurse who was attending the meeting tried to help Moon, but he died at a hospital.

“Our hearts are broken,” said a posting on Thousand Oaks High School’s Twitter account. “The bonds of faculty, staff, & students will bring healing.”

Moon was a varsity tennis player at the school, an honors student and had been accepted to both the University of California, Berkeley and Brown University, friends said.

William Kim, 18, of Irvine, met him last summer at Boys State in Sacramento, a weeklong camp where one standout student from each California high school gathers to set up a mock government.

Moon overwhelmingly was elected to head his fictional party, Kim said in a telephone interview.

Moon was outgoing, friendly, charismatic, ambitious, well-versed in politics and could think on his feet, Kim said.

He was the kind of leader “that made people laugh and feel comfortable,” he added.

“I still can’t believe that I’ve just had a meal with him a month ago, talking as if nothing like this was ever going to happen,” Kim wrote on Facebook.

Moon had placed in the Ventura County science fair in 2015 and 2014. This year’s fair was scheduled for April 20.

The experiment at the elementary campus wasn’t sanctioned by any school, and the victims likely were using the courtyard because it’s an open space, Kuredjian said. Classes at the elementary school northwest of Los Angeles were canceled Tuesday.