In Genesis 18:16-33, we read where God revealed the impending destruction of Sodom and Gomorrah to Abraham. Abraham petitioned God to spare the cities if there were enough righteous people present. It seems this was an effort to spare Lot and his family.
There is a deeper lesson here. God condescends to the prayers of godly men. James said the “effective, fervent prayer of a righteous man avails much” (Jas. 5:16). We see this happen time and again in the Bible.
God hears the prayers of the righteous when they pray for themselves. Jonah prayed from the belly of a fish and was heard (Jonah 2:1-10). Hezekiah prayed for his life and God gave him 15 more years (2 Kgs. 20:1-7).
God hears the prayers of the righteous when they pray for each other. The church in Jerusalem prayed for Peter when he was facing death and he escaped the jail by God’s help (Acts 12:1-11).
God hears the prayers of the righteous when they pray for wicked men. Moses prayed for Israel when they made and worshiped the golden calf (Ex. 32). God spared the nation because of Moses’ pleading.
Thus, what we need are clean hands and pure hearts (Jas. 4:8-10) and be vigilant in prayer for self, saints, and the nation.