The woman killed at an Iowa gender-reveal party over the weekend helped “inadvertently” create a pipe bomb that exploded, investigators said Monday.

The victim was identified as Pamela Kreimeyer, 56, of Knoxville, Iowa.

She was killed instantly Saturday when the gender-reveal announcement device exploded, officials said. Also on hand were four other members of her family and the expectant mother.

IOWA WOMAN, 56, DIES IN GENDER-REVEAL PARTY EXPLOSION, POLICE SAY

"This family got together for what they thought was going to be a happy event with no intent for anyone to get hurt. What ended up happening was that Pamela Kreimeyer, a wife, mother and grandmother, was killed by a piece of metal where a metal stand, gunpowder and colored powder were involved," Marion County Sheriff Jason Sanholdt said.

COUPLE'S GENDER-REVEAL IDEA BACKFIRES WHEN BALLOON FLIES AWAY

The metal piece struck Kreimeyer in the head, his office said.

The office said family members used gunpowder to create a homemade stand that was supposed to blow colorful powder indicating the child's sex, but tape over the top of the metal tubing inadvertently created a pipe bomb that sent shrapnel flying, The Associated Press reported.

CLICK HERE FOR THE FOX NEWS APP

The sheriff said the incident was a reminder that "anytime someone mixes these things there is a high potential for serious injury or death.”

The Associated Press contributed to this report.