This resembles His saying:
“We will turn their hearts and eyes away, just as they did not believe in it the first time.”
Sūrah al-An‘ām, 110
And His saying:
“When they deviated, Allah caused their hearts to deviate.”
Sūrah al-Saff, 5
Allah punished those who turned away from following what He sent His messengers with by placing a barrier within their hearts. Al-Sarī called this “the barrier of jealousy,” because Allah, exalted be He, dislikes and hates that those who disbelieved and rebelled against His command should be granted the understanding granted to a believer, on account of this jealousy with which the Messenger described his Lord. His jealousy is aroused when a servant does what He has forbidden him. The Prophet, peace and blessings be upon him, mentioned this jealousy, which concerns the servant’s actions that He has forbidden. This other jealousy, however, concerns the Lord’s own action.
The Prophet, peace and blessings be upon him, did not describe Allah as being jealous concerning actions He has the power to perform. But al-Sarī saw that the soul jealously guards what it loves against being found where it does not belong, so he called that “the barrier of jealousy.” Allah loves for His servants to do it insofar as they are