IF THERE is one individual who first gave expression to the American ideal of freedom, and religious freedom in particular, it was Thomas Jefferson. Indeed, the third president himself had very clear ideas on his role in history. He laid down that his tombstone should record three achievements: his authorship of the Declaration of Independence; the statute of religious freedom in his home state of Virginia; and the establishment of the University of Virginia.

Nobody questions Jefferson’s decisive part in establishing liberty of belief. But almost everything else about the statesman’s complex attitude to metaphysical matters has been argued over furiously, and the arguers have plenty of raw material. In the course of American history, “freedom of religion” has itself become a kind of religion, and Jefferson’s words, including the 18,000 letters he wrote during his 83 years of life, serve as a kind of holy writ. To this day, many of the bitterest ideological battles raging across America (over prayer in schools, creationism, religious entitlements at work, and so on) are conducted in the name of different visions of religious liberty. So different factions naturally turn to the creator of that ideal, pore over his writings, and ask the unanswerable question: what would Jefferson do?

On one hand, secularists and religious sceptics point with relish to Jefferson’s utter contempt for “priestcraft” and religious power structures of all kinds. Religious believers can retort by stressing his reverence for Jesus as a moral teacher and reformer, and his clear belief in a supreme or providential power.A controversial Texan evangelical, David Barton, has sought to invoke Jefferson in support of his view that America was explicitly founded as a Christian country; but in 2012 a Christian publishing house withdrew at the last moment from circulating a book by Mr Barton on that theme, on grounds that the accuracy of his arguments was open to question. Mr Barton and his supporters objected strongly.

A new book on Jefferson’s religion, “Doubting Thomas”, steers a middle course.On one hand, it squarely accepts that especially after 1800 (in other words, during his presidency and above all, in retirement) Jefferson explicitly renounced manytenets of traditional Christianity. His enquiring and “enlightened” mind had no time for unfathomable mystery. If the idea of one God in three persons was beyond human understanding, it must be wrong. He was exasperated by elaborate theological systems and their authors, from the early church father Athanasius to the Protestant thinker JohnCalvin. Jefferson disliked the Calvinist notion of “salvation by faith alone” andwas inclined to the opposite view; people should be rewarded for what they do, not what they believe. His classically trained intellect led him to the view that diversity of belief should be welcomed, not condemned or punished.

The book’s main author, Mark Beliles, is a non-denominational but traditional Protestant pastor, based in the statesman’s home region of central Virginia, and he can’t be accused of refashioning Jefferson to his own tastes. What he does argue, though, is that the statesman took a benign view of all forms of Christianity, as long as they did not oppress others, or aspire to political power. Although the founder's political opponents accused him of being an infidel, Jefferson never ceased to have a rich and warm web of relationships with many clergy, mostly traditional ones. Over his 65 adult years, the author calculates, Jefferson had significant interactions with 100 religious figures, of whom roughly speaking, 80 were Protestant Trinitarians, eight Catholic Trinitarians and another eight were unconventional sorts who rejected the Trinity. Jefferson was a generous donor to churches, most of which held traditional beliefs. And whatever his personal convictions, his outward religious practice was generally that of an active, church-going Anglican, whenever that sort of church was available to him. He began his adult church life as an Anglican vestryman, which was an important position, and his formal loyalty to that church was reaffirmed in the final years of his life.

Jefferson was, in short, a typically paradoxical product of the constitution he helped to inspire. He had a deep, visceral loathing for government-backed religion, but he also believed in the free exercise of faith, with the emphasis on free.Holding those two principles in tension wasn’t easy for Jefferson, and it hasn’t been easy for any subsequent generation. Nor will his legacy ever provide any simple answers.

