Lutfur Rahman had barely been elected for his second term as independent mayor of Tower Hamlets before an offensive began to delegitimise the results.

This is to be expected. There had been a concerted effort by the media and political establishment to smear Rahman. This culminated in a Panorama exposé, followed by Eric Pickles sending in police to investigate the documentary's claims. And though the investigation turned up no credible evidence of wrongdoing, Labour insiders were confidently expecting victory. To be defeated by a convincing margin in an election where the turnout was London's highest must have hurt.

Now, claims of intimidation at polling stations have been made, by two local councillors hostile to Rahman. Given that there was a policeman stationed at each polling station throughout the election, such intimidation would be particularly brazen. Oddly, no complaint was received on the day, and no such allegations have been reported to police.

Let's consider the specific claims made. Mile End Labour councillor Rachael Saunders described "huge crowds" outside some polling stations, "shouting at people or encouraging them to vote in a particular way". Tower Hamlets Tory councillor Peter Golds also claims that at one polling station he visited, 11 supporters of Rahman were stationed inside the grounds and could be seen thrusting leaflets into the hands of Bengali voters and escorting them to the door of the polling station.

Handing out leaflets and even encouraging people to vote in a particular way is not a breach of electoral law. But whatever the truth of these claims, it is unclear that any voter was actually intimidated into changing their vote. The US-based rightwing website Breitbart, which investigated Rahman's "intimidation", found that there were also, in fact, Labour party volunteers who were crowding polling sites.

We've seen this before. In 2010, in Rahman's first run for mayor, the Labour party debarred him owing to accusations of electoral fraud, after he'd been chosen to be Labour's candidate. Rahman won as an independent and a subsequent investigation by the Electoral Commission found "no evidence" of membership abuse. However, while the accusations were widely reported, the commission's findings remained absent from the popular press.

Likewise, in 2012, there were accusations of electoral fraud against Rahman in two Tower Hamlets byelections. Of 154 allegations, the Electoral Commission found 151 to be without merit, but probed three. What followed was a wide-ranging investigation by the Metropolitan police and the Electoral Commission. A year later, the report found that "the vast majority" of complaints "were reported by local councillors" and that there was "insufficient evidence to prove an offence". While the accusations were reported by every major news source, the outcome of the investigation into them was not.

These claims can be seen as part of a wider political attack, intended not just to delegitimise the outcome of this vote, but to stigmatise Rahman's supporters. One of Golds' claims, for instance, is that in 2010 every Bangladeshi voter in the ward he was standing was stopped and told that he was gay and Jewish. It seems unlikely that Golds both speaks Bengali and was able to hear every conversation that took place. But Golds also implicitly assumes that Bangladeshi voters are homophobic and antisemitic. If this is true then Rahman is plainly not the mayor for them. Rahman has never hesitated to repudiate instances of antisemitism in the borough and has committed to restoring the East London Central synagogue. When the Old Ship, a local gay bar in Limehouse, was faced with the prospect of being unable to renew its licence, Rahman intervened to back a vibrant local campaign, ensuring it could continue to operate with a new 15-year licence.

Indeed, the attacks on Rahman often imply that his supporters are the bearers of ideas not fit for a "mature democracy", as Nick Clegg put it. In recent days, several media outlets have alleged that Rahman's former adviser Kazim Zaidi is threatening street violence unless the outcome of the election is accepted. In fact, Zaidi's actual statement makes no mention of violence, but of a political battle between a grassroots old Labour politics and a machine-driven New Labour spilling "onto the streets". Surely a mature democracy is used to the idea of people taking their grievances to the streets?

The thrust of all this is quite plain. It is to depict a democratically elected politician as a sort of Asiatic despot whose supporters, far from being an energised democratic populace, are stigmatised as intimidating by sheer dint of their number and enthusiasm. There is a deep substrate of racism informing this.

Absent in this type of invective is any consideration of why, in spite of the frenzied mobilisation against Rahman, his own base mobilised even more ardently, putting him back in power with about 12,000 more votes than he received in 2010. The fact that his administration, with its modest means, has built more affordable social housing than anywhere else in the country, may not matter to Rahman's opponents, but it seems to matter to his voters. Tower Hamlets replaced the full education maintenance allowance after the government abolished it, expanded a living wage requirement for all contractors, and allocates a £1,500 grant to every university student. It was the first council in the country to ban contracts with firms that blacklist trade unionists, absorbed all cuts to council tax benefit, refuses to enforce the bedroom tax, and has avoided many of the cuts to vital services, such as libraries and youth clubs.

The story of Lutfur Rahman is a democratic success story. The fact that it seems dodgy to the political and media classes is indicative of how long they've been insulated from anything resembling real democracy.