David's former advisor, Ahithophel, gave the new king Absalom good strategic advice. He told him to go after David immediately. And, if he had done that, he would have had an advantage. But, David had sent Hushai to cancel the counsel of Ahithophel. And, he had prayed and asked God to prevent Ahithophel from prospering. So, Absalom followed the "wait-and-see" approach that Hushai recommended and rejected the "quick-strike" method that Ahithophel had proposed. This was such a devastating turn of events for Ahithophel that it drove him to suicide.
The end of Ahithophel was the work of God as was the protection of 2 messenger boys, Jonathan and Ahimaaz, who were sent to warn David about Absalom's intentions. Even more so did God work through the generosity of three men, Shobi the Ammonite, Machir of Lodebar and Barzillai the Gileadite?
After David crossed the Jordan River going east, these men brought beds, cookware, food and animals to relieve the hungry, weary, thirsty refugees as they hid in the wilderness. God was watching out for David even while He allowed him to suffer the temporary loss of his kingdom. Even in wrath, God can remember mercy. What a wonderful and marvelous God we serve!