2 Samuel 21:13-14 NKJV
So he brought up the bones of Saul and the bones of Jonathan his son from there; and gathered the bones of those who had been hanged. They buried the bones of Saul and Jonathan his son in the country of Benjamin in Zelah, in the tomb of Kish his father. So they performed all that the king commanded. And after that God heeded the prayer for the land.
During the reign of King David, there was a famine that was going on for 3 years. David prayed about it and God told him the land was unproductive because of the innocent blood that was in the ground that had not been atoned for. The blood that cried from the ground to God was the blood of Gibeonites killed by the former king, King Saul. So David asked the Gibeonites what would be justice to them for the innocent blood that was shed. They did not want monetary compensation but rather vengeance against the house of Saul. They requested that 7 of Saul’s male descendants be hung. David granted their request. After he buried the bones of Saul and his son Jonathan which were in the custody of the Gibeonites along with the remains of Saul’s descendants who had been hung, David’s prayer was answered. The famine ceased. The principle of prayer here is that we cannot overlook the wrong we have done and expect God to bless us. We must make amends where we can. Just saying “I’m sorry” is not always enough. If you destroy someone’s property, unless they excuse you, you need to replace it. If you hurt someone in some other way you need to make sure they are satisfied, within reason with what is done to make amends. It may just be an apology. However, whatever it is we must understand that God is a God of justice and fairness and trying to get away with wrongdoing can hold up our prayers being answered.