Illustration: Simon Letch Sadiq Khan is, as much as anyone can be, the organic face of London. This is now a city composed entirely of minorities, its white British population having dropped below 50 per cent years ago. Something like 12 per cent of its population hails from the subcontinent, and a similar number are Muslims. That's what thoroughly global cities are like, these days. They are impossibly cosmopolitan, impossible to describe in simple caricature. They have no single culture, no single personification, not even a static identity. They are cities constantly being made and remade on the run; their only constant is their evolution and ever-expanding diversity. A city like that will eventually produce a Sadiq Khan, as it does a Boris Johnson. This is something new. Sure, London has always been global. But once upon a time that meant it was the seat of a global empire. It was global on British terms. The hierarchy was clear, even among the Empire's varied subjects. These days, it's global on the market's terms. Culture, power, hierarchy, it's all largely what money makes it. As the obscenely expensive foreign-owned apartments sitting vacant in Mayfair attest, it is becoming the world's bank; a place where the super-rich can park their capital.

Illustration: Andrew Dyson That kind of transformation doesn't just demand a new economy. It demands a new sociology. Every society – every village, city, nation – requires bonds of solidarity to hold it together. The great cities – London and New York chief among them – find an identity in the very fact of their dizzying diversity. It's the kind of self-image that means most voters simply fail to see an issue in voting for a Muslim candidate. Khan's electorate has a kind of effortless cosmopolitanism: comfortable with societies whose frontiers keep moving, and able to see him as merely one person among them. That's why the campaign against him – that almost boringly predictable attempt to label him a Muslim extremist – failed so terribly. It just rings so untrue to people of that city, and encourages people only to reaffirm the tolerance they value in themselves. London Mayor Sadiq Khan. Credit:Getty Images Hence the estimation of one former Tory cabinet minister, that the anti-Khan campaign was "utterly ludicrous" and probably "gave him a bigger majority".

It's simple enough – and true enough – to see Donald Trump as the equal and opposite reaction to this kind of thing. But we should perhaps acknowledge the nuances of what that means. Donald Trump has upended the American political landscape. Could it happen in Australia? Credit:AP Beneath the bigotry that so often dazzles us is the appeal to something meaningful. Trump is selling authenticity. A false version of it, sure. But a version of it nonetheless. For all the ridiculous bombast, Trump is a recognisably American character: the brash billionaire who, if you squint, symbolises the possibilities of American success. But he marries this with a kind of nostalgic nationalism that has Mexicans walled out and Muslims repelled. In doing that, Trump is also offering a kind of solidarity. But unlike the fluid, cosmopolitan solidarity shared by Khan's voters, Trump is pointing to something more grounded and static. And that's so appealing precisely because it's such a contrast from the alternative.

This isn't politics as usual. Politics used to be about how we should govern society, and how power and resources should be distributed within it. This new contest is about the very definition of society in the first place; about who's in and who's out. That is, it is precisely a contest of solidarity; a contest between a global national identity, and a more parochial, ethnicised one. For a democracy, that is elemental. At a certain level, democracy is about the mutual according of rights. It requires us to put up with, rather than seek to dominate each other. But that only works when we feel some overarching solidarity towards even those citizens we don't like. Take that away, and democracy becomes a sheer, brutal numbers game. Hence the famous observation of sociologist Michael Mann that in extreme cases democracies plus ethnic diversity equals ethnic cleansing. Societies like ours, or Britain's, or the US's are simply too diverse to fall apart in quite that way. But it's also true they're beginning to fray. The US case is most obvious, but even Australia, which has been admirably resistant to the most virulent strains of nationalist politics is seeing more of it now. Hence the arrival of new fringe minor parties, anti-political fads like the Palmer United Party, and the increased influence of hard-right members of the Coalition. And we're seeing it at precisely the same time as the politics of hyper-diversity are becoming ever stronger.

That's not an accident. It's a contradiction that has been building ever since globalisation became a buzzword. It's just that now it's becoming explicit in ways we weren't expecting. When Trump decided to set up an anti-Muslim forcefield around the US, he would have wanted it to keep Sadiq Khan out. Definitely not the mayor of London, though. Waleed Aly is a Fairfax Media columnist, winner of the 2015 Quill award for best columnist, and a lecturer in politics at Monash University.