The test-firing of a cadet-built rocket motor at the Air Force Academy Wednesday ended spectacularly when its 80 pounds of rocket fuel detonated, sending pieces of the craft flying for dozens of yards.

The rocket, a 2-year-old model, was manufactured as part of a program that teaches cadets engineering by having them design and build spacecraft.

The test-firing, on a horizontal stand, drew a crowd that included Gary Payton, the Air Force’s deputy undersecretary for space programs.

The rocket was supposed to generate more than two tons of thrust on a 10-second burn, enough to send it into the lower reaches of space. Weeks of preparation went into the test, including an X-ray examination of the rocket’s fuel to ensure it would burn correctly.

“This was completely unexpected,” said senior cadet Wayne Black, who headed the cadet effort. “Right now we have no clues.”

The detonation sent a blast wave across Jack’s Valley and firefighters came in to extinguish burning wreckage. Cadets watching the test from a safe distance met the blast with a mix of groans and laughter.

Cadets will now have to figure out why their rocket exploded.

Col. Marty France, who oversees Academy space engineering programs, said they’ll have to pick up the pieces of their shattered rocket and piece together what happened.

“I won’t say it’s the preferred method of learning,” France said. “But it will give them a different focus for the next month or two."

Payton, visiting from the Pentagon, said the blast will make the cadets better engineers down the line.

“You learn more from failure than from success,” he said.