Edward Archbold had a plan to win a female Ivory Ball python. He’d eat enough roaches and worms in a contest Friday and claim his prize.

While he won the contest, however, the 32-year-old West Palm Beach man collapsed outside the Ben Siegel Reptile Store in Deerfield Beach and died later at a nearby hospital, the Broward County Sheriff’s Office said Monday.

Archbold consumed “dozens of roaches and worms” during the “Midnight Madness” contest, which drew nearly 30 contestants, the sheriff’s office said. An autopsy will determine the cause of death.

The store owner insists it wasn’t the food.

Discoid roaches, Siegel told the Miami Herald, are “eaten by people all over the world.” The roaches served up at the contest were domestically raised “for exotic pet feed,” Siegel said, adding that they were “pure, clean protein.”

All the bug-eaters “were entirely aware of what they were doing and that they signed thorough waivers accepting responsibility for their participation in this unique and unorthodox contest,” according to a statement issued through the store’s attorney, Luke Lirot.

Siegel hadn’t met Archbold before Friday night but said he cut a colorful figure as soon as he arrived at the store on West Hillsboro Road.

“He seemed like kind of a wild guy – he was wearing a bandanna, wrist bands and a shirt that said ‘Event Staff,’” Siegel said. “He was brought there by a snake enthusiast. He was trying to win the snake for his friend.”

According to rules posted in an online forum, the prize would go to “the guy or gal that eats the most bugs in 4 minutes without vomiting.”

Archbold was downing discoid roaches and worms one by one and winning the contest. He even updated his Facebook page, which identified him as Edward William Barry, during the competition: “So I nailed Qualifying the quota was 10 roaches in 30 sec. … i did 8 and the 2 that my comp vomited next to me,” he said at one point.

But Archbold started throwing up before he was able to collect the snake that he won for his friend. He collapsed outside the store and was taken to Broward Health North where he was pronounced dead.

The “Midnight Madness” bug contest was the first one at Ben Siegel Reptiles on West Hillsboro Road, although an employee said “customers or close friends will eat them all the time.” Renee, who declined to give her last name, said she has also eaten bugs.

“The horn worm kind of tastes like a melon, but it has a sweet flavor. Crickets don’t really taste like anything, and mealworms have a kind of nutty flavor,” she said. “I’ve eaten the roaches too, but just the baby ones.”

The insect-eating that grossed out observers on Friday night is actually par for the course in other parts of the world.

Edwin Lewis, an entomologist at the University of California at Davis, described the surprisingly enjoyable experience of eating cooked waterbugs in Thailand, which are not too far removed from cockroaches.

Lewis suspected that an allergic reaction could have been the cause of death.