Hadith by Rasul Allah may Allah’s blessings be upon him and his family: “The judgment is not rejected except by supplication.”

I did not understand this hadith. We know that Allah Almighty knows everything, and that Allah Almighty has written everything that we will do. If he wrote to us to supplicate to him, we will supplicate to him. This means that supplication is part of the judiciary. If Allah knows that we will call him, how does our supplications change what Allah has written for us?

Allah has two types of wills: the contingent and the fixed. The fixed does not change. Nothing can change it. The contingent can be changed. Let’s say that a person is decreed to die at age 30 based on his circumstances and the factors surrounding him. If he does a good deed or supplicates, Allah will change those factors so that he can live another 30 years. In this example, supplication changed this decree. But if the person had not supplicated, he would have died at 30. Now obviously Allah knows what this person will do, since Allah is outside of time and He sees everything at once, but in the end, the idea here is that the person played a role in his fate. His deeds played a role in how long he lived. This motivates us to always do good.