Primarily a theologian, al-Ghazali taught in Baghdad, but in 1095 after a breakdown abandoned academic fields for a life of contemplation. He valued the insight given by mystical comprehension of things above that achieved by logic or reason. His Incoherence of the Philosophers is an attack on the Aristotelian doctrines of al-Farabi and especially Avicenna. Generally speaking al-Ghazali attacks the range of knowledge claimed by philosophers, particularly through a critique of knowledge of causation, about which he defends occasionalism. The certainty of his own reasoning opened him to counterattack by Averroës (The Incoherence of the Incoherence). al-Ghazali is also remembered as the author of the Revival of the Religious Sciences, an important influence on Sunni Islam.