(CNN) Family members had hoped to build a contraption for a fun gender reveal party in Iowa, but they instead built an explosive device that killed a grandmother, police said Monday.

"This family got together for what they thought was going to be a happy event with no intent for anyone to get hurt," Marion County Sheriff Jason Sandholdt said.

Pamela Kreimeyer, 56, was killed when a piece of shrapnel from the device struck her in the head at the Saturday soiree in rural Knoxville, about 40 miles southeast of Des Moines.

Members of Kreimeyer's family got together Friday to begin experimenting with "different types of explosive material" in hopes of creating a gender reveal device and recording the unveiling for friends and family on social media, the sheriff's office said in a statement.

"On Saturday afternoon five family members and the expectant mother gathered and placed gunpowder in the bottom of a homemade stand that was welded to a metal base plate," the sheriff's statement said.

Read More