2 Samuel 21:1
“Then there was a famine in the days of David three years, year after year; and David enquired of the LORD. And the LORD answered, It is for Saul, and for his bloody house, because he slew the Gibeonites.”
Throughout the Scriptures, God often sent famines to get His people to respond to something they needed to correct. The verse above shows this to be true when God sent a famine because Saul had unjustly slain a group of people. The blood of the Gibeonites had to be avenged, and the only way God could get David to do this was to send a famine. David responded accordingly, and God ended the famine.