For so it was, that the children of Israel had sinned against the LORD their God, which had brought them up out of the land of Egypt, from under the hand of Pharaoh king of Egypt, and had feared other gods,
The children of Israel sinned by fearing other gods after God rescued them from Egypt and Pharaoh's rule.