BALTIMORE—Moments before it was time to test a new bridge, its designers grew tense. Could the structure handle the load?

At first it seemed sound enough. Then suddenly, the span snapped. The bridge-builders winced. Onlookers groaned. Pasta flew.

The collapse was the culmination of a summer engineering course at Johns Hopkins University and more than 100 high schoolers were squaring off in a competition to build the strongest span out of a brittle substance: dry spaghetti.

After noodling over the design and construction for weeks, students vied to see whose half-pound pasta-and-glue bridge could bear the most weight. In a crowded auditorium, teams added weight to their spans. And one by one, their decidedly-not-gluten-free structures crashed in crunchy heaps.

"We're raising it just to kill it, like a farm animal," 17-year-old Elise Laird of San Antonio recalled telling her teammates before the July contest.