IN A STUDIO in the basement of an empty office block overlooking the Olympic Stadium, a group has assembled. The regular monthly gathering, entitled “Mere Coincidence?”, is organised by Fintan Friel, an Irish artist who likes to bring people together; and its title gestures nicely towards the billions of fruitful encounters between people from different parts of the globe that happen in London.

A Spanish artist is showing his paintings; a Bulgarian who sells handbags at Selfridges, a department store, admires them. An Iranian artist offers crudités. A South Korean slips past to get to work in the studio next door. He is said to be a robotics genius but keeps himself to himself. A Texan woman with blue hair sings a Mozart aria. She is studying cultural entrepreneurship at Goldsmiths College. Out of 52 people on her course, she says, there are four Britons, one of whom is called Abdullah.

London was invented by foreigners. The Romans established a colony in 43AD on an easily bridged bend in the Thames. Boudicca, leader of the Iceni tribe and an early opponent of immigration, burnt it to the ground 17 years later. But it grew back; and thereafter it became a magnet for foreigners, partly because it was a convenient trading post and partly because it lay safely off the coast of a continent where bad things happened horribly often.

The locals occasionally followed the Iceni in rising up against the latest arrivals: there were riots against Jews in the 13th century, the Flemish in the 14th, the Italians in the 15th and so on until the Notting Hill riots against West Indians in 1958, the most recent ostentatiously xenophobic disturbance. Yet those episodes may say more about Londoners' tendency to riot than about their attitude to foreigners. Certainly, Voltaire thought it a pretty tolerant place in the 18th century:

Take a view of the Royal Exchange in London, a place more venerable than many courts of justice, where the representatives of all nations meet for the benefit of mankind. There the Jew, the Mahometan, and the Christian transact together, as though they all professed the same religion, and give the name of infidel to none but bankrupts.

But though London is used to immigration, the scale and nature since the mid-1990s has changed. Previous waves of immigrants—the Huguenots in the 17th century, the Jews at the end of the 19th, the West Indians in the 1950s and 1960s and the South Asians in the 1970s and 1980s—tended to come from one particular region. Now they come from everywhere.

That diversity is hardly unique. More than a third of Londoners (up from 18% in 1987) were born abroad, but so were more than a third of New Yorkers, and they, too, come from a great variety of places. Yet whereas New York's founding myth is of an immigrant city, London regards itself as the home of an island kingdom's monarchy (conveniently forgetting that most of its dynasties were immigrants). And London's high levels of immigration are both more recent than New York's and different in that its new arrivals are rich as well as poor.

The scale of recent immigration separates modern London not just from its past but also from the rest of the country: two-fifths of Britain's migrants live in London, and in the rest of Britain only 8% of the population are foreign-born. “I'm the most diverse person in the village,” notes a Scottish company director who has recently moved to rural Sussex.

There are many reasons for the flood. Disruption—wars in Africa, Iraq and Afghanistan—and repression drove some people from their homes. Liberation—the collapse of the Soviet Union and the expansion of the EU—brought others. Growing wealth, especially in emerging markets, brought still more.

London attracts foreigners partly because it lies off the coast of a continent where bad things have happened horribly often

History and geography drew them to London. The empire spread the English language around the world, created the financial centre and attracted millions from Britain's former colonies. A tradition of political liberalism ensured a welcome to people seeking sanctuary from nasty regimes. The time zone—conveniently positioned between America and Asia—encouraged the growth of the financial-services sector.

The international nature of the City's business in part explains the foreigners' wealth. According to a senior banker who has worked in both New York and London, “80% of the dealmakers in Wall Street, and 90% of the deals they are doing, are American. In the City [of London] 65% of the dealmakers are foreign and 90% of the deals have an international element.”

A trusted legal system, stable politics and an honest bureaucracy are especially valued by those who have made money in countries that have none of these. “It is a huge source of comfort to our clients that our contracts are drawn up under English law,” says Ileana Gratsos, a Greek-born, London-based provider of luxury Greek villas to people all over the world. “Every time you sell to a client, you're selling a bit of England.”

Lower levels of regulation than in continental Europe have attracted entrepreneurs. There are reckoned to be 300,000-400,000 French people in London, making it the sixth-biggest French city. The tax policies of France's new president, François Hollande, are expected to bring still more. More than 4% of the residents of Kensington and Chelsea are now French, and the borough has a French lycée.

London is more welcoming than New York to rich foreigners. The attractions of the “non-dom” regime, under which the taxman ignores the offshore earnings of those who are domiciled elsewhere, have been reduced by the imposition of a levy of £30,000 a year on those who have been resident for seven years, rising to £50,000 after 12 years' residence; still, it retains its appeal for the very rich. Britain's regulators are less nosy than America's, and foreigners are generally free to buy its best properties, whereas in many Manhattan apartment blocks existing residents can veto new ones. London does not care where people's money comes from, so long as there is plenty of it.

Previous waves of immigrants—West Indians and South Asians—tended to be poor, whereas recent arrivals are concentrated at the top as well as the bottom: there are more investment bankers and cleaners among the foreign-born than the local population. They are also younger and better educated. “The Impact of Recent Immigration on London”, a study by the London School of Economics (LSE) published in 2008, showed that among migrants who had arrived in the previous three years, 61% had graduate-level qualifications, against 30% of native Londoners, and only 7% had no qualifications at all, against 24% of natives. Even the children of the earlier, poorer, immigrants are generally doing well (see chart 2): Bangladeshis have just overtaken whites, and black Africans are nearly on a par with them. A richer mix All this has changed London utterly. It has created a new elite: foreigners, or recently naturalised Britons, dominate the best neighbourhoods and the best schools (see article). It has altered the sound of the streets: English is not the first language of 22% of Londoners and 42% of London children. It has given rise to “multicultural London English”, as the linguists call it—a mix of Cockney, Jamaican and other languages spoken by the young of all ethnic groups. It has transformed London's food: a city once famous for its inedible cuisine now has better restaurants than Paris or Rome. It has led to the growth of Islamist extremism and the occasional assassination of Russians. It has also redrawn London's map. London has always been a city of villages, but now those villages are ethnic. The Koreans are in New Malden; the Portuguese in Stockwell; the Arabs in Bayswater; the Turks, Kurds and Turkish Cypriots in Haringey, Hackney and Islington; the Bangladeshis and Pakistanis in Tower Hamlets and Newham; the Indians in Southall and Wembley; the Jamaicans in Brixton; the Nigerians in Peckham; and so on.

David Goodhart, the director of Demos, a think-tank, argues that this has made London a fissile place. He points to studies that show lower levels of social cohesion in places with high levels of immigration. But last year's riots were a picture of multiracial harmony, with black and white looting side by side. And immigration seems to have little impact on London's wider politics. Other things being equal, immigrants are more likely to vote Labour than the population as a whole, yet the rise in London's migrant population did not stop the Tories' Boris Johnson from taking the mayoralty from Labour's Ken Livingstone in 2008 and holding on to it earlier this year. At the same time the far-right British National Party, which might be expected to benefit from rising immigration, lost its only seat in London's assembly.

Economically, London's openness to the rest of the world seems to have had four broad effects. It has pushed up house prices (of which more later), and it has made the city less equal, more productive and more resilient.

The rise in inequality is due partly to the concentration of immigrants at both ends of the economic scale, but the LSE study suggests that the arrival of lots of poor people has also depressed wages. Rates of economic inactivity in London are also on the high side compared with the rest of Britain. That may be because some of the immigrants come from societies where female employment levels are low. Unemployment is also fairly high. That may be because the combination of low wages, expensive housing and state benefits create a poverty trap that discourages people from working.

The LSE study concluded that immigration had probably increased productivity because skilled migrants had relieved bottlenecks in the labour market. Various surveys of employers come to the predictable conclusion that migrants are better employees: they are more highly skilled, work harder and are prepared to do jobs that locals disdain. They may also be more innovative. In America they are disproportionately responsible for tech start-ups; similarly, they are over-represented in Silicon Roundabout, the tech hub east of the City, according to Harry Marr of GoCardless, a payments company, which “is about half white British blokes, the rest are mostly European, with one Japanese guy”. Max Nathan, a researcher at the LSE who has surveyed 7,400 companies in London, has found that firms set up or managed by migrants are more innovative. “There is a small but significant ‘diversity bonus' for London,” he says.

Study "The Knowledge", our interactive guide to London's demography and economy

Foreigners may well have helped to mitigate the impact of the recession on London. First, migrants make an economy flexible. When demand for labour falls, some of them leave: the Polish plumber, who became a fixture of the London building trade after his country's accession to the EU, disappeared after the 2007-08 financial crisis. Second, foreigners' money has fuelled demand for services, held up property prices and kept afloat development projects that would otherwise have folded.

Just completed, the Shard, a sliver of glass on the bank of the Thames south of the City, is the EU's tallest building, but it nearly came a cropper. The developer, Irvine Sellar, a Londoner who made his first fortune in Carnaby Street in the 1960s, was going to finance the development with bank loans, which evaporated after the collapse of Lehman Brothers in 2008. Qatari investors stepped into the breach and now own 80% of the development. “I don't think it would have been built without them,” says Mr Sellar. Similarly, Dubai's port authority, DP World, is building Britain's largest container port, London Gateway, on the estuary of the Thames. It is due to open next year, but had it been financed by debt, it would probably not have survived the crash.

Foreigners have not just transformed the city's society and economy. They are also changing its shape.