How to overcome obsessions

Q: What should a Muslim do if he suffers from Waswasah (insinuating or obsessive thoughts instigated by Satan) that almost led him to the verge of committing Shirk (associating others with Allah in His Divinity or worship)?

A: All praise be to Allah Alone, and peace and blessings be upon His Messenger, and his family and Companions.This person must ward off these insinuating thoughts as much as lies in his power by busying himself with contemplating on the Qur’an, thinking of Allah’s Magnificence and so on. He should also recite the supplications (for refuge and protection) that are reported in authentic Hadith such as, “I believe in Allah and His Messengers...” and he should also seek refuge with Allah (Exalted be He) from the accursed Satan.May Allah grant us success. May peace and blessings be upon our Prophet Muhammad, his family, and Companions.