الحمد لله رب العالمين، والصلاة والسلام على أشرف الأنبياء والمرسلين، نبينا محمد وعلى آله وصحبه أجمعين أما بعد
Ibn al-Qayyim (rahimahullaah) said:
“Guarding the thoughts and protecting them, and being cautious with every caution from heedlessness of them and relaxedness with them, for indeed the origin of corruption in its entirety comes from its part, because it is the sowing of the seed by Satan and the soul in the ground of the heart. So if he is able to sow it, Satan assumes upkeep of it by irrigating it – time after time until it turns into intents, then he irrigates it until it becomes firm resolutions, then he does not cease to engage with it until it yields actions.
No doubt; repelling thoughts is easier than repelling intents and firm resolutions, the servant then finds his soul incapable – or as though incapable of repelling it after it becomes decisive intent. He is improvident if he did not repel it while it was merely a weak thought, like unto the one who is careless with an emitting spark from a fire that happens to land in dry firewood, so when it gains influence with it, he is left incapable of extinguishing it.
If you were to say: ‘What is the way to safeguarding the thoughts?’
I say: through many factors:
The First of them: The definitive knowledge of the awareness of The Lord, The Most High, and of His Seeing your heart, and His Knowledge of the detail of your thoughts.
The Second: Your shyness from Him.
The Third: Your esteemed exaltation for Him, that He should see the like of such thoughts in His abode which He created, to understand Him and to love Him.
The Fourth: Your fear of Him in that you should fall from His Eye on account of those thoughts.
The Fifth: Your preference for Him in that your heart should afford residence to anything other than love of Him.
The Sixth: Your fear that those thoughts should generate forth, and that their emitting sparks should kindle ablaze, and thus consume that which is in your heart from Eeman and love of Allaah, and that it should take it away altogether – and yet you do not notice.
The Seventh: You should know that those thoughts hold the position of the grain (seed) that is thrown to the bird in order to hunt for prey with it. So know that every single thought from it; then it is a grain in a snare set up in order to hunt you – and yet you do not notice.
The Eighth: You should know that those bad thoughts, they along with the thoughts of Eemaan and the causes of love and turning repentantly – do not come together at all, rather they are their opposites from every perspective, and the two do not convene into the heart except that one of them will overcome the other – and will expel it, and will settle down in its place. So what then is the assumption of a heart in which the thoughts of the soul and Satan have overcome the thoughts of Eemaan and love and understanding – and so expels them, and settles down in their place? However; were there any life for the heart, it would have felt pain due to that, and would have come to sense what it was afflicted with.
The Ninth: It should be known that those thoughts are a sea from the oceans of the imagination that has no shoreline for it, thus if the heart enters into its submerging depths – it drowns within it, and strays in its darknesses. So it seeks deliverance from it, yet does not find a way to it, so the thoughts; they alienate the heart far from salvation, chastised, preoccupied with that which is of no avail.
The Tenth: Those thoughts, they are the valley of the foolish and the aspirations of the ignorant ones, therefore it does not yield for its associate anything except regret and disgrace, and if it gains ascendancy over the heart, it appoints it a legacy of (satanic) whisperings, and dismisses it from its sovereignty, and corrupts its subjects upon it, and casts it into prolonged captivity.
So just as this is known with regard to the psychological thoughts, then likewise is the case with the thoughts of religious beneficent faith, it is the very source of good in its entirety. Indeed, the ground of the heart – whenever there is sown into it the thoughts of Eemaan and reverential fear and love and turning repentantly (to Allaah) and attestation of the promise and hoping for the reward, and it is irrigated time after time, and its associate assumes upkeep of it by guarding it and adherence of it as well as attentiveness over it, it yields for him every handsome deed, and fills his heart with good things, and so it utilizes his limbs in acts of obedience, and by way of it the dominion becomes well-established in its sovereignty and its subjects are rendered upright for it.
For this reason, when a group from those that traverse (the path) actualized that, they endeavoured upon safeguarding the thoughts, and that was their traversal and their occupation, and this is beneficial for its associate along with two conditions:
One of them: is that he does not leave off an obligation nor anything optional by way of it.
The second: is that he does not make safeguarding it as the sole purpose. Rather that is not complete except by his putting in its place the thoughts of Eemaan and love and turning repentantly (to Allaah) and having reliance and reverential fear (of Him), and so he vacates his heart of those (initial) thoughts and furnishes it with their opposites. Otherwise, whenever he acts based upon his vacuity of both of them together he is at loss, it is a must therefore to give comprehension to this.”
(Taken from: Tareeq al-Hijratain p.377-380)
 Ibn al-Qayyim mentioned: “So the heart is an empty tablet (slab of slate), and the thoughts are inscriptions that are engraved into it, how then does it befit for the one possessing intellect that the inscriptions of his tablet should consist of what is among: lies and conceit and deceit and false aspiration and mirage that has no reality to it? So what wisdom and knowledge and guidance are engraved together with these inscriptions?” (Ad-Daa wad-Dawaa p.361)
 Ibn al-Qayyim said: “Know that the advent of the thought does not harm, the only thing that harms is summoning it and engaging in discourse with it. So the thought is like the passer-by upon the path, if you do not summon him and you leave him, he passes and abstains from you, and if you summon him; he enchants you with his speech and his deceit and his conceit, and it is the lightest thing upon the vacant fruitless soul, and the heaviest thing upon the heart and soul that is eminent – heavenly – serene.” (Ad-Daa wad-Dawaa p.360)
 Ibn al-Qayyim said: “Completeness is only in filling the heart and the conscience with thoughts and intents and cogitation in attainment of the pleasures of The Lord, The Most High, from the servant and from the people, and the consideration of the ways to that and of reaching it. Therefore the most complete of people are those that are the most abundant of them in thought and contemplation and intents for that. Just as the most deficient of people are the most abundant of them in thought and contemplation and intents for his own enjoyments and desires – wherever it should be.” (Ad-Daa wad-Dawaa p.362)