At that time Joshua invoked this solemn oath: “Cursed before the LORD is the man who rises up and rebuilds this city, Jericho; at the cost of his firstborn he will lay its foundations; at the cost of his youngest he will set up its gates.”
Jewish Publication Society of America Version (JPS1917) - Joshua 6:26 >And Joshua charged the people with an oath at that time, saying: 'Cursed be the man before the LORD, that riseth up and buildeth this city, even Jericho; with the loss of his first-born shall he lay the foundation thereof, and with the loss of his youngest son shall he set up the gates of it.'