Mormonism is detested by some American evangelicals because it is "not Christianity" – but perhaps more because it is the first, great, truly American religion. It is founded on claims that no outsider can take seriously, but validated by one of the greatest epics of the settlement of the west, and secured by prosperity and tithing.

Mormonism is clearly derived from Christianity: the book of Mormon is written in a god-awful pastiche of the prose of the authorised version of the Bible, and it was revealed to the world in 1830 in the most fervently pious region of a fervently Christian country: the region of New York state known to itinerant preachers as "the burned over district" because the fires of revivalism had crossed and recrossed it so often.

Before the Mormons, American popular Christianity was still recognisably a form of English puritanism. The Methodists and the Baptists both had their origins in England, and both had taken over a very English understanding of history. According to this myth, the Protestant British were playing the same part in contemporary history as Israel had done in the Old Testament. They were God's chosen people, threatened by enemies all around, but delivered by God when they were faithful to him. The defeat of the Spanish Armada and its scattering in a storm known as "the protestant wind" was of the same order as the deliverance of Israel from the Babylonian captivity had been.

This myth crossed the Atlantic almost unchanged and, even after the war of independence, persisted with a slight change of cast: America was now God's chosen country, and the British empire was the wicked and decadent pharaoh or caesar from whom it must be rescued. That is the theological explanation for why the villains in Hollywood always have British accents. But it also very powerful in mainstream US politics: it is where the idea comes from that God has a special purpose for America.

The book of Mormon radically outbids that. Supposedly dictated by an angel to the quasi-literate prophet Joseph Smith, and written on tablets of gold that no one but Smith ever saw, and which he translated from an unknown language with the help of a magic stone, it contains a vast and detailed prehistory of America. According to this scripture, America was settled by the lost tribes of Israel and visited by Jesus Christ. The message here is that America was not the "new Israel", but that it had always been as much a part of God's purpose, and as much a theatre of his action, as Israel had been.

This was a doctrine extraordinarily attractive to immigrants, and to those who were left out under the old dispensation. In 1846, after Joseph Smith was lynched in prison by a mob, his successor, Brigham Young, one of the most remarkable men of the 19th century, led the survivors westward to Utah, through the most terrible hardships, and founded Salt Lake City. They made the desert bloom. A high proportion of these heroic emigrants had been recruited by Mormon missionaries in Lancashire.

Throughout the 19th century, the Mormons were very clearly a cult. They are even the sinister villains of one of the Sherlock Holmes novels, A Study in Scarlet.

Much of the hostility was centred on their sex lives. The practice of polygamy had been revealed as permissible to Joseph Smith by a forgiving God after his wife caught him with a serving girl; it was disturbing to orthodox Christian sentiment. It was one of the factors in an armed standoff with the federal government in 1858, known as the Utah war. As late as 1903, when the Mormon Reed Smoot was elected as senator from Utah, Congress held three years of hearings to determine whether he should be allowed to take his seat; in the end, a simple majority of the Senate voted to expel him, but not the two thirds required.

In the course of the 20th century, the Mormons, however, became mainstream. This has little to do with theology. What marks a cult out is not its beliefs, but its distance from the surrounding society.

Modern public Mormons are almost parodically conformist and technocratic. The public image of Mitt Romney is not of a man who holds strange beliefs that he will act on if elected, but the opposite – a man who has no principles whatsoever, and almost no personality. Abstinent, frugal, hard-working and rich, the Mormons have moved from the fringe of American life to its centre – not least because their religion is so intensely American. Whether or not it's crazy, it has worked.