London is going through one of its periodic fits of smugness right now, for which the only real parallel is the US after the election of Barack Obama first time round. I refer, obviously, to the election of Sadiq Khan as the first Muslim mayor of a major European capital. 'Doesn’t it do us proud?' one of my friends observed. A nice young colleague told us she had wept – wept – twice in the course of the weekend. 'He took a bus to City Hall,' she marvelled. 'It was a victory over bigotry,' another friend observed, the bigotry obviously being Zac Goldsmith’s campaign, for raising the whole Islamic extremism thing. I don’t know how many times I heard people observe highmindedly, 'London’s not like that,' or 'They misjudged London'. And that’s certainly true.

As I say, for a comparison with this mood of being on the high moral ground, think Democrat voters after the election of Obama: they felt that his election reflected rather well on them too and basked in the knowledge that they had proved, incontrovertibly, that they were on the right side of history. Or like those people who cheered on Mo Farrah in the Olympics; it went beyond being on the side of a winner; it was about being on the right side of a moral argument. 'I’m no racist, me,' was the subtext.

I can see, though, why Muslims feel rather proud of Sadiq Khan. It’s like Catholics felt when JFK was elected: he’s one of us. 'Our boy done good' is an uncomplicated and rather kindly emotion, more generous and authentic than that of those who simply want to show off that they are better human beings than the other lot. 'I’m diverse, I am,' these people want to say. 'Not like Zac’s lot.'

Personally, I’m kind of glad that Khan won, for the simple and sufficient reason that he conducted a really good campaign and Zac Goldsmith’s lot conducted a rubbish, incompetent one. If this is the best the Tories can do with their smart polling and in-depth knowledge of individual voter preferences, I hope the party isn’t relying on it for anything bigger than a mayoral election. Labour’s campaign was smart, reactive and got off the ground and was halfway round the course while Goldsmith was still mulling over whether he wanted to run. If there’s one person who is entitled to feel smug right now it’s Paddy Hennessy, Khan's communications and strategy man.

But there are other reasons to see the upside to Khan's win - other than convoluted party political reasons. There is a Dick Whittington aspect to his story; he made the most of the bus driver father and council estate upbringing during the campaign, obviously, but there was indeed something to be proud of in having become Mayor of London from a poor background. He’s allowed to feel pleased with himself.

Then there’s the whole security thing. When David Cameron talks about a) cracking down on Islamist extremism and b) Islam having nothing to do with terrorism, Muslims are entitled to feel disgruntled about being lectured about their own religion by an Etonian member of the CofE. When Khan calls on Muslims to dob in Isis recruiters, or to join the police, he doesn’t even need to go through all the guff about what Islam stands for because he is a Muslim. Simply by being part of the Establishment, he makes it harder for Islamists to make out that it’s us versus them. We’ll see how he manages the security aspect of things in practice – I’d be alarmed, myself, if he opted for quotas for BME recruits to the Met – but there’s no denying it: being a Muslim makes the whole community relations thing much easier.

My own priorities are pretty simple: because I’m invariably broke, I like his Tube fares freeze. And my other strong feeling is that I’ll back pretty well anyone who will put an end to London being carpeted with really horrible high-rise developments. Boris Johnson’s parting gift to the capital is that there are over 400 of them coming up. Thank you, Boris. Maybe Sadiq Khan will be more of an aesthete. Meanwhile, it’s going to be really grim in London breathing in the thick, dense fug of self-congratulation.