Vienne is right - there is a lengthy piece as to how this redemption was made, but the firstborn was purchased.
Some of the gods that were sacrificed to were Dagon and Baal and Molech- 2 Chronicles 34:4 and Judges 16:23. Note that Jesus was the only human sacrifice for the world. No human sacrifices were made that were under God's protection However, if leaving that protection Israel was open to all kinds of bad influences. including child sacrifice but when that occured God was not happy Ezekiel 20:26. They were cut off. Take the 20th Chapter of Ezekiel from vs 4 and read the history of Israel (if not known) how they were a chosen nation out of all on the earth. At vs 39 He is really angry with them. Actually the Books of Kings is a good reference who was a good king and who was bad and the casting off of Israel was back and forth, yet he always forgave them.