Immigration was a divisive and prominent issue in the general election and, this week, the topic is firmly back in the spotlight with the coalition's announcement of a new cap covering those from outside the EU.

It has long been somewhat of a taboo topic and yet our ambivalent attitude to immigration seems at odds with the multicultural society in which we apparently live. In fact, these two strands of multiculturalism versus racism have deep roots in British history, which we can trace back at least to the 19th century.

During the Victorian years a series of groups arrived in significant numbers, above all the predominantly Catholic Irish, the Germans and, from the 1880s, Jews fleeing persecution in the Russian Pale of Settlement.

Download the new Independent Premium app Sharing the full story, not just the headlines

On the one hand we can detect a strong positive strand towards these newcomers in the century leading up to the First World War, essentially providing the basis for contemporary multiculturalism, yet at the same time, the period from circa 1830 to 1918 witnessed some of the most viciously xenophobic acts in modern British history.

The tolerance of Victorian and Edwardian Britain reveals itself in a series of ways. In the first place, amazing as it may seem today, Britain had no immigration laws for most of the 19th century, a situation which would not change until the passage of the 1905 Aliens Act, aimed at East European Jews and forming the basis of all subsequent immigration legislation. Passports, meanwhile, would not become an issue until the First World War. At the same time the Victorian period was also the era of emancipation for ethnic minorities, above all Catholics and Jews.

At the start of the 19th century, the former could barely practice their religion, as Britain remained stuck in the anti-Catholic mindset which had accompanied the Reformation of the 16th century. However, a series of measures would grant both of these minorities full civil rights, beginning, most importantly, with the Catholic Emancipation Act of 1829 which allowed Catholics to sit in Parliament, although it did not grant full emancipation. Catholics could still not hold posts in schools or universities controlled by the established church, while priests could not wear their clothes outside their places of worship. Full emancipation and equality would not arrive until the end of the 19th century.

Jews, meanwhile, would not obtain the right to sit in Parliament until the 1850s, yet by 1910 they made up 2.4 per cent of the House of Commons, at a time when they constituted less than 1 per cent of the British population.

At the same time, Britons also welcomed refugees for much of the 19th century. British high society responded positively to the arrival of wealthy and educated Italian exiles escaping the straitjacket imposed on nationalism and liberalism by the Congress of Vienna in 1815. Their symbolic position as victims of Continental oppression guaranteed their positive status.

Similarly, German exiles also received a positive response when they arrived in England, as evidenced by the example of the middle class and liberal Gottfried Kinkel, although the left wing Karl Marx and Friedrich Engels did not get quite the same treatment. On the other hand, the Hungarian revolutionary leader Lajos Kossuth found himself fêted as an opponent of Habsburg tyranny in public meetings and in the press, becoming one of the greatest heroes in Victorian England until the Italian nationalist Garibaldi replaced him.

Just as importantly, while Victorian society may appear predominantly Anglo-Saxon, immigrants had an obvious impact in a variety of ways. In the first place, newcomers helped the industrialisation process, whether in the form of Irish navvies and factory workers, helping to build the infrastructure and produce the industrial goods which made Britain the first industrial nation, or prominent German entrepreneurs, whose skills helped establish the basis of many of Britain's leading firms such as Schroders, Kleinworts, Rothschilds, ICI and Tennents. At the same time, immigrants helped to create the British inner city, epitomised by the East End of London, which changed from Irish to German to Jewish between 1840 and 1914. Catering would not have developed in the way it did in Britain without migration.

Daily coronavirus briefing No hype, just the advice and analysis you need Enter your email address Continue Continue Please enter an email address Email address is invalid Fill out this field Email address is invalid Email already exists. Log in to update your newsletter preferences Register with your social account or click here to log in I would like to receive morning headlines Monday - Friday plus breaking news alerts by email Update newsletter preferences

During the late Victorian period continental settlers established some of the most famous restaurants in London including the Café Royal and the Ritz. At the same time Germans, Frenchmen and the Swiss staffed restaurants of all sizes throughout the country by the outbreak of the First World War, as this French concept of bourgeois dining (the restaurant) spread throughout Britain. Meanwhile, German musicians helped to transform music in Britain during the 19th century, as indicated by names such as Sir Charles Hallé, who founded the Manchester orchestra which bears his name after fleeing the 1848 revolutions, and Frederick Delius, born in Bradford in 1863 to middle class German parents. Germans also helped to staff many of the major British orchestras which would emerge during the course of the 19th century. At the same time German brass bands marched up and down the country during the late Victorian and Edwardian years, joining Italian organ grinders.

Nevertheless, this picture of a Victorian and Edwardian multicultural society needs balancing against the vicious and violent xenophobia which accompanied it. The 800,000 or so Irish who moved into the country, especially at the time of the potato famine of the 1840s, found themselves living cheek by jowl with the equally poor Scottish and English working classes.

While this poverty may have partly caused the animosity towards the newcomers, the ideological driving force consisted of anti-Catholicism. For the first time since the Reformation of the 16th century, Catholics found themselves living in England and Scotland in significant numbers at a time when Protestantism remained important in the lives of most Britons. Despite the gradual emancipation of Catholics during the 19th century, it was accompanied by popular and press hostility towards the newly-arrived poor Irish immigrants. The type of sectarianism which characterises Northern Ireland became a feature of Victorian cities such as Manchester, Liverpool and Glasgow where fighting between Roman Catholic and Protestant young men became part of everyday life. At the same time, as anti-Catholicism declined during the course of the 19th century in England, periodical publications began, under influence of Darwinism, racialising the Irish, which meant depicting them as apes contrasted with the English.

As the second and subsequent generations of Irish increasingly became integrated, Britons caught the prevailing xenophobic disease of the late 19th century in the form of antisemitism. It focused especially upon those Jewish refugees fleeing murderous pogroms in Russia from the 1880s, leading to the passage of the 1905 Aliens Act. While Victorian tolerance could cope with the few thousand well-heeled exiles arriving between the 1820s and the 1850s, it could not deal with the tens of thousands of Jews moving especially into the East End of London, where a campaign orchestrated from Parliament emerged against them. Britain's first racist political grouping of the 20th century also emerged in these years in the form of the British Brothers League.

The Aliens Act of 1905 symbolised the end of the Victorian open door policy towards immigration, yet the Jewish community which had arrived from Eastern Europe in the decades leading up to this event would experience significant social mobility during the 20th century, which would bring it into the elites of British society. The same did not happen to the German immigrants who found themselves in Britain at the outbreak of the First World War. This minority had actually experienced relatively little hostility during the Victorian and Edwardian years, but became highly visible in 1914. Over the next four years British xenophobia reached a height not seen since the Middle Ages, which resulted in internment, property confiscation and mass rioting, culminating in deportation at the end of the First World War.

Yet even while Germans faced ethnic cleansing, the country welcomed 240,000 Belgian refuges, who symbolised the fight against Germany. The First World War, like the two centuries which preceded and succeeded it, illustrates the complexity of the British interaction with immigration in which the strand of tolerance and multiculturalism lives parallel with that of racism.

Panikos Panayi is Professor of European History at De Montfort University and author of "An Immigration History of Britain: Multicultural Racism Since 1800" which is published by Longman (£18.99). To order a copy for the special price of £17 (free P&P) call Independent Books Direct on 08430 600 030, or visit www.independentbooksdirect.co.uk