A high school student in Thousand Oaks, California, is dead after a homemade rocket attached to a skateboard exploded Monday night.

Bernard Moon, 18, and an unidentified 17-year-old were working on the skateboard, which they hoped to enter in a science fair scheduled for April 20.

When the rocket didn't go off as expected, Moon went to check on it. That's when the explosion occurred, injuring the two teenagers, according to KTLA.com.

Moon died as a result of the blast. The other teen suffered only minor injuries.

The rocket was about 12 inches long and three-quarters of an inch in diameter, according to Ventura County sheriff’s Capt. Garo Kuredjian.

"It wasn’t meant to go up into the sky," Kuredjian told News10.com. “It was meant to go horizontally to propel a skateboard.”

He said it wasn't clear whether anyone was trying to ride the skateboard at the time.

The teens were experimenting in a courtyard at a Thousand Oaks elementary school, where Boy Scouts and Girl Scouts were holding a meeting. Tammy Coburn, who was attending the meeting, told KABC TV that no one knew what happened at first.

"Nobody could really discern what [the explosion] really was because it was a huge explosion, but it was just all at once," she said. "Just a 'boom!' That was it."

Coburn said a Girl Scout leader who was also a former military member recognized the sound and went to investigate what happened.

"He quietly stepped out of the meeting, closed the door and went out," Coburn said. "He's the one that came upon the boys and then got the emergency help from a Girl Scout nurse."

Despite the efforts of the nurse and EMS crew members, Moon died shortly after 10 p.m. at Los Robles Hospital & Medical Center, the Ventura County Star reported. The cause was blunt force trauma according to an autopsy conducted by the Ventura County Medical Examiner's Office. The incident was ruled an accident.

The other teen was released from the hospital Tuesday afternoon.

CBS Los Angeles Bernard Moon and a friend were experimenting with a souped-up skateboard.

The accident has cast a pall over Thousand Oaks High School, where Moon was an honors student. The other students were encouraged to wear the school colors on Wednesday as a tribute to him. The elementary school where the incident occurred was closed on Tuesday.

“He was just a cool kid. He was a nice person ... He could make you laugh. He was just the kind of person that you would want to interact with,” student Ken Zhou told CBS Los Angeles.

Moon, who was described as "brilliant" by Coburn, had placed at the Ventura County Science Fair in 2014 and 2015. He hoped to win first prize this year.

CORRECTION: The elementary school where the incident occurred, not the high school that Bernard Moon attended, was closed Tuesday.