In his days Hiel of Bethel built Jericho. He laid its foundation at the cost of Abiram his firstborn, and set up its gates at the cost of his youngest son Segub, according to the word of YHWH, which he spoke by Joshua the son of Nun.
1 Kings 16:34 (See Joshua 6:26)

Nobody knows how Hiel's sons died, whether they were killed in the construction, struck down by God, or perhaps even sacrificed to whatever gods Hiel petitioned to bless the walls and gates. Does it matter? There is no good way to lose a child, let alone two. Hiel should have heeded Joshua's warning.