A woman in Iowa died during a gender reveal announcement on Saturday after flying debris from an explosion from what amounted to a homemade pipe bomb struck her, the authorities said on Monday.

The woman, Pamela Kreimeyer, 56, died instantly after she was struck in the head by a piece of metal from a device that was intended to reveal the sex of the baby, the Marion County Sheriff’s Office said in a statement on Monday.

Guests gather at gender reveal parties to watch expectant parents announce the sex of their baby. The announcements have become more elaborate, with some involving plumes of smoke, pops of confetti or explosive effects to the shades of blue and pink.

On Saturday afternoon, members of the Kreimeyer family and the expectant mother were at a home in Knoxville, Iowa, about 40 miles southeast of Des Moines.