1 Kings 11:4-10

11:4 When Solomon became old, his wives shifted his allegiance to other gods; he was not wholeheartedly devoted to the Lord his God, as his father David had been. 11:5 Solomon worshiped the Sidonian goddess Astarte and the detestable Ammonite god Milcom. 11:6 Solomon did evil in the Lord’s sight; he did not remain loyal to the Lord, like his father David had. 11:7 Furthermore, on the hill east of Jerusalem Solomon built a high place for the detestable Moabite god Chemosh and for the detestable Ammonite god Milcom. 11:8 He built high places for all his foreign wives so they could burn incense and make sacrifices to their gods.

11:9 The Lord was angry with Solomon because he had shifted his allegiance away from the Lord, the God of Israel, who had appeared to him on two occasions 11:10 and had warned him about this very thing, so that he would not follow other gods. But he did not obey the Lord’s command.

Joshua 23:15-16

23:15 But in the same way every faithful promise the Lord your God made to you has been realized, it is just as certain, if you disobey, that the Lord will bring on you every judgment until he destroys you from this good land which the Lord your God gave you. 23:16 If you violate the covenantal laws of the Lord your God which he commanded you to keep, and follow, worship, and bow down to other gods, the Lord will be very angry with you and you will disappear quickly from the good land which he gave to you.”