The cure for Satanic thoughts Question:

Sometimes dangerous notions and ideas come into my mind and i fear that they may remove me from the pale of my religion; what can i do about them? Answer:

These notions and thoughts are from Shaytan, who whispers into the hearts of mankind in order to cause confusion to the Muslims; so when you feel any such thing, seek refuge in Allah and stop thinking about matters of the unseen, matters of (Allah's) Attributes and creation, so that your conviction is not weakened.
Fatawa Islamiyah Darussalam Vol:1 page no.224