Shortly after the end of his first term in office, Liberal leader William Gladstone penned a pamphlet against Catholicism. Denying it was even a spiritual faith, he argued that British followers could not be loyal to the Crown and the Pope and said they sought to undermine traditional British values, hiding “crimes against liberty beneath a suffocating cloud of incense”.

The polemic became a bestseller, shifting 150,000 copies within weeks. The streets of London were filled with impoverished Catholic immigrants, the women wearing headscarves, and fears rose over the impossibility of integration. The capital was used as a base for terror attacks that killed more people over the following 15 years than were killed by Islamic jihadists at the start of this century.

Today Gladstone’s diatribe seems absurd. One of his most recent successors attended mass while in Downing Street, and the monarch can marry now into the faith.

Each wave of mass immigration provokes the same old fears before newcomers are subsumed into evolving nations. After Catholics it was the turn of Jews, accused of inhabiting a parallel society with a strange language, clothing and customs — yet the fried fish they introduced to these shores became our national dish.

Now it is the turn of Muslims. Debate over their place in modern Britain has been thrown into sharp relief this week with the release of the latest tranche of data from last year’s census. Already we have the top-line numbers, which reveal the biggest rise in our population in two centuries due to immigration, increasing fertility and longer life expectancy.

Today we see a clearer snapshot of the changing shape of our multi-hued nation and of the capital, with details of ethnicity, religion and falling home ownership in London especially. Given the pace of change and chilly economic climate, much of the discussion will focus on immigration. Sadly, it is powered in large part by misinformation and mistrust of Muslims.

The previous census in 2001 asked about faith for the first time and revealed Islam as Britain’s second-biggest religion, with 1.6 million adherents. Since then, 13 of the 20 fastest-growing boroughs are those with high concentrations of Muslim residents, led by Tower Hamlets and Newham in east London. The 2011 census estimates that there are now 2.7 million British Muslims, with nearly 40 per cent of them — a million — living in London.

This raises important issues. The 2001 census found followers of Islam to have the youngest age profile of any religion — good news in our ageing society. But they were clustered in areas of deprivation, with high unemployment, poor education, overcrowded housing and few women working.

The new census has uncovered some improvements. Yet deep issues of integration remain, lingering legacies of the conservative, poor and rural societies many of these Muslims left to come here. This is no different from the situation of those Catholics who fled poverty in Ireland or the Jews escaping pogroms in Eastern Europe — today their successful descendants are woven seamlessly into the fabric of the nation.

Integration is hindered, however, when prejudice is so prevalent. It is not just the hate spewed out by far-Right groups, who shifted from battling black immigrants to crusading against Muslims. Across society, bile against Muslims is the acceptable bigotry —Baroness Warsi, the Tory minister, was right to round on its dinner-party respectability last year.

A little-noticed section of the Leveson report said Muslims were targets of systematic press hostility. The judge had good cause for concern: even journalist Polly Toynbee, the high priestess of progressive politics, has admitted to taking pride in Islamophobia.

Polls have found nearly half of Britons think there are too many Muslims in Britain and more than half believe they “create problems”. Needless to say, such negative attitudes are not found against other religions.

Surveys have also found that Muslims from Bangladesh and Pakistan take more pride in being British than any other immigrant group. Despite this, we hear endlessly the same old lies about their lack of loyalty, their soaring reproduction rates, their desire to live apart, their hatred for host communities.

These are brilliantly taken apart in The Myth of the Muslim Tide, a new book by Canadian journalist Doug Saunders. To take just one surprising finding, the number of jihadist terrorist incidents in Europe in the eight years after 9/11 represented less than one per cent of terrorist incidents on the Continent.

But now old myths are turbocharged by the internet and social media. Just look at the 13.6 million hits of an infamous video on YouTube called “Muslim demographics”. The statistics showing a supposed Islamic takeover of Europe are false but are ceaselessly recycled — the seven-minute video was even played at a Vatican synod.

The consequence of this is men being abused, women having their hijabs ripped off and mosques being vandalised. One Muslim woman told the BBC last week how she changed her name by deed poll to improve her chance of getting a job, yet still saw attitudes alter at interviews.

In time, today’s Islamophobia will appear as archaic as Gladstone’s anti-Catholicism. The census also shows a sharp rise in mixed marriages, the ultimate test of integration. Another report out today reveals the emergence of a “melting pot” generation, especially in London, where one-third of residents were born abroad. These young adults have far more tolerant attitudes then their parents and grandparents.

Gladstone, a devout Christian, was no liberal when it came to Muslims either. He once called the Koran an “accursed book” and, holding it up in Parliament, declared there would never be peace in the world so long as it existed. The sooner he is proved wrong on this count too, the better for us all.