Immanuel Kant was an atheist. This claim will jar with those who wish to conscript Kant into the army of the faithful, and who point out – quite rightly – that he believed we should conduct our moral lives as if we had free will and immortal souls answerable to a divine judge who will reward the good and punish the bad. But these three ideas – freedom, immortality, God – are, he said, artefacts of our thought about morality, which we postulate not in order to provide grounds for morality, but to answer the moral sceptic's question, "why should I bother with morality at all?" In his treatise Religion Within The Bounds of Reason Alone, Kant wrote: "So far as morality is based upon the conception of man as a free agent who, just because he is free, binds himself through his reason to unconditioned laws, it stands in need neither of the idea of another Being over him, for him to apprehend his duty, nor of an incentive other than the law itself, for him to do his duty." But he then added that man must have an end in view in order to act at all, not as a ground for acting but as the point of acting. To provide such an end, which is the same things as answering the question "what is to result from this right conduct of ours?", we must manufacture for ourselves "an idea of an object which takes the formal condition of all such ends as we ought to have (our duty) and combines it with whatever is conditioned, and in harmony with duty, in all the ends which we do have (happiness proportioned to obedience to duty) — that is to say, the idea of a highest good in the world for whose possibility we must postulate a higher, moral, most holy, and omnipotent Being which alone can unite the two elements of this highest good."

In short, morality suggests the fiction of a rewarding or punishing "higher Being". Kant later adds that a rational person pondering what kind of world would best accommodate the possibility of morality (did this inspire John Rawls' idea of the 'initial position'?) would be sure to invent for it just such a deity; and this precisely summarises Kant's own view.

If the evidence here for Kant's thesis that, God is merely a postulate of human thinking, is not enough to establish his atheist credentials, one can add in support his swingeing dismissal of arguments for the existence of a deity in his Critique of Pure Reason. There the standard cosmological, teleological and ontological arguments (respectively: from first cause, design and the concept of a necessary being) are conclusively refuted. He accordingly argues that the idea of a deity is a "transcendental illusion" resulting from the mistaken endeavour of reason to apply concepts outside their proper scope – that is, making trans-empirical use of concepts whose sole and proper application is to empirical experience alone.

Kant was born to Pietist parents in Konigsberg, a city plagued by religious strife in which the Pietists, a fundamentalist Lutheran sect, played a leading role. Pietism emphasised the emotional and personal in religious experience, in opposition to what its founder, Philipp Jakob Spener, saw as the dogmatic and intellectualist tendency of orthodox Lutheranism. Its exaggerated, even hysterical, focus on emotional religiosity was repulsive to more sober and reflective minds, among whom Kant, of course, numbered.

Kant was thus far too intelligent to adhere to his parents' creed, and he kept well away from the controversies that the sect eagerly inflamed. He did not parade his religious scepticism, instead finding ways, as did almost all his 18th century fellow atheists and agnostics, to mask it. The only major philosopher of the century who made no pretence at hiding his atheism was David Hume. The superstitiously religious James Boswell visited Hume on his deathbed to see whether the philosopher would recant at last, and left shaken and disturbed by the equanimity with which Hume faced the restful prospect of extinction.

There could be no better mask for Kant's true opinions than his thesis that we had better help ourselves to the idea of a rewarding and punishing deity to give point to the moral life. I detect something tongue in cheek about this, for two reasons: first, Kant well enough knew Plato's view that although religious beliefs are false they are useful in controlling the unlettered. There is not much water between that frank view and Kant's own. And secondly, Kant begins his account of "religion within reasonable bounds" by saying, "it is man's own fault if he needs [the idea of a God to spur him to morality], for whatever does not originate in himself and his own freedom in no way compensates for the deficiency of his morality."

It would otherwise not be easy to square this remark, taken together with the thesis that the great targets of metaphysical enquiry – freedom of the will, immortality of the soul, and the existence of God – are "transcendental illusions", with Kant's sop to the theists that one should behave "as if" the two last (at least) were real. So the answer is surely that Kant intended all his remarks together to count as verbum sapienti – "a word to the wise." And who wiser than those under no illusions, transcendental, theistic, or otherwise?