Joshua 7:7

7:7 Joshua prayed, “O, Master, Lord! Why did you bring these people across the Jordan to hand us over to the Amorites so they could destroy us?

Joshua 23:16

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.”