I HAVE an article in today's (London) Times arguing that Ned Flanders has beaten his fellow moustache-wearer, Friedrich Nietzsche, in the struggle to define modernity.

The most risible thing about Flanders, of course, is his bulletproof Christian faith. Equipped with a degree from Oral Roberts University, and a simple-minded optimism, Flanders is arguably America's best-known Christian. Indeed, Christianity Today once suggested that he is more famous, on campuses and in schools, than the Pope, Mother Teresa or Billy Graham.

There are few more easily ridiculed characters in TV-land than Ned Flanders, the cartoon character who has the misfortune to live next door to Homer Simpson. He has a silly moustache! He wears jumpers! His first name is Nedward! No wonder we all smile with approval as Homer subjects him to one humiliation after another.

Flanders gets off lightly compared with other celluloid evangelicals. Evangelicals may make up a third of the US population, but this is one minority that Hollywood has no time for. Ever since Elmer Gantry, the phrase “evangelical preacher” has been a shorthand for hypocrite. Most evangelicals are portrayed as murderers, rapists and sexual perverts with a consistency that, if they were black or Jewish, would get the American Civil Liberties Union into a lather. In Cape Fear, the antihero is a deranged Pentecostal who goes down to his watery death singing hymns. In O Brother, Where Art Thou?, an itinerant Bible salesman beats his kindly benefactors with a piece of wood and steals their money. Even the James Bond franchise got in on the act, casting a megapreacher as a (lecherous, of course) frontman for a cocaine cartel in The Living Daylights.

The sins of Flanders are of a much milder sort. The owner of the Leftorium store for left-handed people is occasionally ridiculed for being intolerant. He once participated in a walk “for the cure of homosexuality”; he tried to baptise Bart and Lisa without their consent, with predictable results. But for the most part he is simply ridiculed for being, well, ridiculous. What other response could we have for a man who owes his success in life to the three Cs: “Clean living, chewing thoroughly and a daily dose of vitamin Church”?

But is Ned really such a loser? Look around the world and you find that risible old Nedward - or at least the phenomenon he epitomises - has won one of the great intellectual battles of the past two centuries. And now, far from being put down, Flanderism is spreading around the world, an American export with a potency at least the equal of the very Hollywood products that mock him.

The great battle has to do with religion and modernity. Ever since the Enlightenment, intellectuals have predicted that religion - and particularly the effusive brand of religion now practised by evangelicals - would be doomed by modernity. The high priests of the Enlightenment mocked Christianity as a refuge for superstitious freaks. Edward Gibbon was never happier than when chronicling the absurd activities of the likes of Saint Simeon Stylites, who for more than 30 years lived on top of a pillar 21m (70ft) high and 1m square. In his novel La Religieuse Diderot mocked the religious for their psychological oddities and deviant pastimes, not least flagellation.

The founders of modern sociology, Max Weber and Émile Durkheim, predicted the secularisation of the world. Ned's fellow moustache-wearer, Friedrich Nietzsche, loudly announced God's death. Marx cursed the opium of the people. Freud saw religion as a mere neurosis. Ever since Darwin, educated European thought has viewed religion as a dying cult - the refuge of the ignorant, the superstitious and a few guilt-ridden Catholic novelists such as Graham Greene and Evelyn Waugh.

The land of Ned and Homer, of course, has always been different. While the French slaughtered priests during their revolution, seeing religion as a bulwark of the ancien régime, America's Founding Fathers separated Church from State, in large part to protect the former from the latter. The First Amendment set off a fierce competition between America's “multiplicity of sects”, with a succession of evangelising religions vying for people's attentions: the Methodists converted an eighth of the country within a generation of the revolution. While Europe's state-sponsored religions shrivelled, America's free market kept faith alive.

That has not stopped most American intellectuals continuing to bet that eventually their country would give in to the same acids of modernity as Europe. In 1959, C.Wright Mills argued, in The Sociological Imagination, that “in due course, the sacred shall disappear altogether, except, possibly, in the private realm”. In its 1966 Easter issue, Time magazine asked “Is God Dead?” on its cover. In the same year, Thomas Altizer, a theologian, published to much acclaim The Gospel of Christian Atheism. In 1968, Gallup found that 67 per cent of Americans believed that religion was losing its impact on society. In 1988 Tom Wolfe told students at Harvard, not entirely happily, that they lived in an era of “freedom from religion”.

The theory was (and remains in a few places - just read The New York Times or visit Cambridge, Massachusetts) that America was the exception, not the rule. Under this logic, Ned Flanders was the religious equivalent of the duck-billed platypus, a creature ill equipped for the modern world who has somehow survived extinction. Rational America, went the theory, would gradually ditch such superstitions; religion would survive only with the weak, the poor and the stupid. True to that picture, ever since the Scopes “monkey” trial in Tennessee, where a bunch of them were exposed as crude evolution-deniers, American evangelicals have been regarded as bigoted buffoons,

But that picture is beginning to change - and the argument is beginning to swing from Nietzsche to Ned Flanders. At the grandest level, sociologists are wising up to having made “a category mistake”. That is the term used by Peter Berger, the dean of the subject. He points out that academics used to associate modernity with secularisation; in fact the really modern thing is pluralism. The ability to choose your religion lies at the heart of the American model. The latest figures show that one American in four has swapped faiths in his or her life. Pluralism can certainly mean that some people choose not to be religious: the number of atheists in America has jumped nearly 10 percentage points to 16 per cent in the past two decades (prompting a cover of Newsweek dedicated to “The Decline and Fall of Christian America”). On the other hand the same figures also show a rise in the number of committed evangelicals and of Pentecostals. Three quarters of Americans - the most advanced country on the planet - still describe themselves as Christians.

Look around the Christian world and the religious ecology is moving in an American direction. Established Churches are losing their monopoly. New market entrants are advancing the principles of competition and choice. Ned Flanders is not a man who likes to leave Springfield (his only known excursion out of town, to Las Vegas with Homer, ended in disaster). But if Ned were to venture abroad he would find plenty of people like himself - in churches the size of football stadiums across Latin America, in 4,850ha (12,000-acre) “redemption camps” in Nigeria, in storefront churches in the slums of Rio and Guatemala City, in brick-and-mud tabernacles with metal roofs and dirt floors in rural South Africa.

Virtually everywhere in the developing world fiery preachers are preaching a faith that would appeal to Ned Flanders: live your life according to God's law, read the Bible as the literal word of Truth, treat your neighbour as yourself. And everywhere they are thriving. In 1900, 80 per cent of the world's Christians lived in Europe and the United States; today, 60 per cent of them live in the developing world.

States that were once committed to enforcing secularism are now facing religious revivals. In Russia, 86 per cent of the population identify themselves as Christians; but the most remarkable example of Flanderism can be found in China's house churches. We recently visited an apartment in a well-heeled district of Shanghai, where a technology executive hosted two dozen clever young Chinese, including several CEOs, a well-known academic and a stem-cell researcher. They spent three hours studying one letter from St Paul. Soon their church will get too big: it will cross the 25-person limit for unauthorised meetings, or one of the neighbours will complain about the hymns or the people hogging the parking spaces. So the church will have to split, guaranteeing its growth. China is well on its way to being the world's biggest Christian country: there are at least 80 million Christians and already more people go to church every week than are members of the Communist Party.

Even Europe is showing some signs of abandoning secularisation. The most obvious sign of this, of course, is the rise of European Islam, driven by one of the greatest mass migrations in history. But there is more to it than this. Some of the immigrants are Christians. Evangelical Christianity and charismatic Catholicism are both on the rise, albeit from small bases. Some two million people have taken the Alpha course - a sort of Anglican version of Rick Warren's Purpose Driven Life. As for politics, Tony Blair's press secretary, Alastair Campbell, famously said that the Prime Minister “did not do God”. Nowadays Blair, who runs a religious foundation, spends the bulk of his time “doing God”. France, the home of laïcité, is now led by Nicolas Sarkozy, who has written a book arguing that religion should be given more of a role in the public square.

Why is religion enduring? One reason is that even if Homer (the Greek one, not his Springfield namesake) exaggerated when he said that “all men have need of the Gods”, some men (and even more women) clearly do. Some people have always looked to religion to provide life with meaning and purpose. Today it is secular Europe that looks like the exception. Berger jokes that, rather than studying evangelicals like Flanders, sociologists would be better employed studying Swedes and university professors, because they are the historical oddities.

Moreover, the forces of modernity are clearly helping religion. The sort of churches that Flanders belongs to are past-masters at using every new piece of technology and every advance in managerial wisdom to spread the word: megachurches have segmented and re-segmented the American market. Now Christian America is doing the same for the world, with its pastorpreneurs preaching to hundreds of thousands of people (in 2005, T.D.Jakes delivered two sermons at Nairobi's Uhuru Park that attracted an estimated crowd of a million people) or devoting their lives to helping the world's poor (there are more than 100,000 full-time American missionaries around the world).

Rick Warren points out that churches have one of the world's greatest infrastructures: there are “a million villages around the world that don't have a school, a clinic, a hospital, a fire department or a post office ... but have got a church”. Warren's own church, Saddleback, sends hundreds of missionaries a year to Africa. He distributes a clinic-in-a-box, a portable supply of medicine that people in isolated villages are trained to dispense. His kit also includes a school-in-a-box, a business-in-a-box and a church-in-a-box. “We've got more volunteers than anybody else,” Warren says. “Government doesn't have a billion volunteers. Business doesn't have a billion volunteers.” Ned Flanders's enthusiasm for helping his neighbour has gone global.

That is plainly not always a good thing. The global revival of faith has engendered religious conflict as well as good works: go to Nigeria and you will find a blood-spattered struggle between conservative Christianity, funded by Ned's collection-plate money, surging northwards, and fundamentalist Islam, backed by Saudi money, pushing southwards. Even in more peaceful places, evangelical missions sometimes spend more time trying to convert poor people than trying to help them. As everywhere else, religion is capable of bad as well as good. But even allowing for that, something remarkable is happening. Some newly religious people around the world are scared and weak: religion is a storm shelter against globalisation (certainly in many of Islam's Arab heartlands). But for an increasing number of people, religion is a tool of upward mobility; many of the Indians flocking to the Hindu BJP, and Turks joining the Islam-orientated AKP, are the sort of bourgeoisie that Nehru and Ataturk wanted to create. This seems to be especially true of US-style Christianity. In the Chinese house church, religion is seen as an essential guide to profiting from globalisation. The bookshops in megachurches in the developing world are stocked with books on management and self-help.

This ties in to the final reason why the Flanders-as-loser stereotype is wrong: evangelicals are doing rather well for themselves. There seems to be a link between religiosity and upward economic mobility in the US. That is partly because the heartland of evangelical America, the South, has been booming. But other things seem to be at work. Jonathan Gruber, a secular- minded economist from the Massachusetts Institute of Technology and an alumnus of the Clinton Administration, has even argued, on the basis of a mass of evidence, that church-going produces a boost in income. To summarise a complex argument: a 10 per cent increase in the density of people from the same religious group living in the same neighbourhood leads to an 8.5 per cent rise in church-going, and a 10 per cent increase in the density of co-religionists leads to a 0.9 per cent rise in income.

There is also considerable evidence that, regardless of wealth, Christians are healthier and happier than their secular brethren. David Hall, a doctor at the University of Pittsburgh Medical Centre, maintains that weekly church attendance can add two to three years to your life. A 1997 study of 7,000 older people by the Duke University Medical Centre found that religious observance might enhance immune systems and lower blood pressure. In 1992 there were only three medical schools in the United States that had programmes examining the relationship between spirituality and health; by 2006, the number had increased to 141.

One of the most striking results of the Pew Forum's regular survey of happiness is that Americans who attend religious services once or more a week are happier (43 per cent very happy) than those who attend monthly or less (31 per cent) or seldom or never (26 per cent). White evangelical Protestants of the Flanders variety are more likely to report being very happy than white mainline Protestants: 43 per cent compared with 33 per cent. The correlation between happiness and church attendance has been fairly steady since Pew started the survey in the 1970s; it is also more robust than the link between happiness and wealth. Attending church weekly, rather than not at all, has the same effect on people's reported happiness as moving from the bottom quartile to the top quartile of income distribution - and is a lot easier to do.

Religion can combat bad behaviour as well as promote wellbeing. Twenty years ago, Richard Freeman, a Harvard economist, found that black youths who attend church were more likely to attend school and less likely to commit crimes or use drugs. Since then, a host of further studies, including the bipartisan 1991 National Commission on Children, have concluded that religious participation is associated with lower rates of crime and drug use. JamesQ.Wilson, perhaps America's pre-eminent criminologist, summarises a mountain of evidence from the social sciences succinctly: “Religion, independent of social class, reduces deviance.”

Evangelicals have also caught up with much of the rest of America in terms of their education. Over the past 30 years the proportion of evangelicals earning at least a college degree has increased by 133 per cent - more than any other religious tradition. Enrolment in evangelical colleges grew by 60 per cent in 1990-2002 at a time when the general college population was static. Evangelicals are also breaking out of the “holy cocoon” and becoming more familiar figures on Ivy League and other elite campuses. Michael Lindsay, a sociologist at Rice University, calculates that about 10 per cent of the undergraduate body is regularly involved in evangelical groups. The rise in the proportion of evangelicals is partly an unexpected (and, for many liberal professors, a no doubt unwelcome) by-product of the campus's obsession with diversity. At Yale, for example, 90 per cent of the members of the Campus Crusade are Asian-Americans.

In 1994 Mark Noll published a wonderful little book called The Scandal of the Evangelical Mind, which lamented the absence of an evangelical intelligentsia. But since then the scandal has diminished somewhat, not least because of the work of a remarkable group of evangelical historians such as Noll. Evangelicals are finally recognising the virtue of C.S.Lewis's observation that “God is no fonder of intellectual slackers than of any other slackers.” The Conference on Christianity and Literature has a membership of more than 1,000 and publishes a journal and monographs. The Society of Christian Philosophers is one of the largest sub-groups in American philosophy. Books & Culture is an evangelical version of The New York Review of Books.

In his own way, Flanders is not a bad advertisement for the advantages of his creed. He has a spectacular physique despite apparently being in his sixties (by contrast Homer, beer-bellied and saggy-eyed, is a walking heart attack). When Ned's Leftorium shop for left-handed people totters on the edge of bankruptcy, the Springfield community, led by Homer himself, rallies around to save him.

True, he has an absurd smile - and he smiles a lot. But then he has a lot to smile about. There is his conviction that his soul has been saved. There is Homer. And there is the fact that the world is headed in his direction, not Nietzsche's. Somewhere in Hell, or whatever purgatory is reserved for European thinkers, a moustachioed German is looking up at The Simpsons, hitting his head and saying: “D'oh!”