THE official declaration has not yet taken place, but already it is arithmetically certain that Sadiq Khan has won London’s election and will be the capital’s new mayor. With over 90% of ballots counted he leads Zac Goldsmith, his Tory rival, by 44% to 35%. The decisiveness of his victory is easy enough to understand. London is a Labour city; in Britain, as across northern Europe, the centre-left vote has held up better in metropolitan areas than elsewhere. And Mr Khan had the local machine, the story (the son of a bus driver from Pakistan, he grew up in a council flat) and the right pro-enterprise, pro-infrastructure, cosmopolitan pitch for his electorate. He was also fortunate in his opponent. When Mr Goldsmith won the Tory candidacy for the mayoralty, he looked like a savvy choice: the thoughtful, environmentalist south-west London MP who had vastly increased his majority in Richmond at the general election. But as some noted at the time, and many more are now opining with the benefit of hindsight, he was a strange pick. London is a cocksure, roiling city and has always opted for worldly bruisers (of which Mr Khan is undoubtedly one) as mayor. By contrast, Mr Goldsmith has all the thrusting, scrappy vigor of a minor royal doing a walkabout at a country fête (“and what do you do?”). His almost bashful demeanour, his Euroscepticism and his conservationism were an odd match for a strutting global metropolis badly in need of new housing, railway lines and runways. Moreover, the Tory campaign’s relentless focus on Islam, Mr Khan’s religion, was divisive and uncharacteristic of its candidate. In an op-ed last Sunday accompanied by a giant photo of the bus blown up on July 7th 2005, Mr Goldsmith asked: did Londoners want a leader with terrorists for friends? It is true that Mr Khan had, for example, appeared on platforms with Suliman Gani, a radical imam. Yet as a prominent British Muslim, a civil liberties lawyer and a big figure in London politics (Mr Goldsmith, too, had appeared alongside Mr Gani), it is only natural that Mr Khan should have crossed paths with such characters. Dark Tory warnings about his sympathies looked paranoid when set against his broadly liberal record: the MP for Tooting had supported gay marriage (for which he received death threats), fought to keep a local pub open and had condemned recent incidents of anti-Semitism in Labour with a vigour conspicuously unmatched by its leadership.

So the knives are out for Mr Goldsmith. Peter Oborne, a veteran Tory commentator, had already accused him of importing Trump-style politics to Britain. Since the polls closed Lady Warsi, the party's former chairman, Steve Norris, its former London mayoral candidate, and Andrew Boff, the Conservative leader in the London Assembly, have all condemned their party’s swivel-eyed campaign; the latter claiming its “outrageous” tactics have done it “real damage”. Tellingly—indeed, encouragingly—the results suggest that these dented the Tory vote not just among the Muslims whose compatibility with British democracy Mr Goldsmith implicitly questioned, but also the Hindu voters at whom, among others, such insinuations appeared to be recklessly targeted.

What sort of a mayor will Mr Khan make? Interviewing him in February (transcript here), the signs seemed to me mostly good, if not unequivocally so. Most concerning is the new mayor’s inclination—shared by his predecessor, Boris Johnson—to say whatever he thinks his audience wants to hear. This quest to please is related to his habit of flip flopping on contentious issues, like Heathrow Airport expansion. And his “pro-business” programme seems to be more about what firms can do for the mayor than what he can do for firms. All that said, Mr Khan is also appealingly energetic and impatient to get on (he even talks too fast, skidding towards the end of his sentences like a frazzled commuter dashing for the last train) and a dynamic operator, as his unexpectedly successful campaigns for his party’s nomination and then for City Hall have shown.

On the policy areas by which his mayoralty should be judged, the picture is mixed. He rightly wants to expand the powers of the job, which is puny in comparison with its New York equivalent, and seems to get London’s dire need for more and better public transport. But the plans for house building on which he campaigned are woefully inadequate; not good in a city where, at this rate, the average price will hit £1m by 2030. His resistance to building on the green belt and his opposition to expanding Heathrow are also disappointing, though in February I got the impression that he was not entirely convinced about either position. In my column on our encounter I argued that, as mayor, he would need to appoint a strong policy chief who could bring big thinking and drive to these crucial areas. I ventured that Andrew Adonis, the infrastructure-obsessed peer who as secretary of state in the last Labour government was Mr Khan’s superior in the Department for Transport, would be an ideal pick. It is encouraging to hear rumours that Mr Khan has a big job lined up for him.