While David was king, there were three years in a row when the nation of Israel could not grow enough food. So David asked the LORD for help, and the LORD answered, “Saul and his family are guilty of murder, because he had the Gibeonites killed.”
In all your troubles, you may finally decide that you want to worship only the LORD. And if you turn back to him and obey him completely, he will again be your God.