Labour’s self-inflicted wounds over anti-Semitism could hardly have come at a worse time for Jeremy Corbyn. He already faces a tricky test in his first nationwide elections as Labour leader on Thursday. The Conservatives could push his party into a humiliating third place in the Scottish Parliament; Labour could be deprived of its majority in the Welsh Assembly and could lose more than 100 seats in council elections in England. The only beacon of hope for Corbyn was the likelihood that Sadiq Khan would oust the Tories in London by becoming the city’s mayor. Now Labour’s debilitating row over anti-Semitism has put a question mark over that. Khan admitted yesterday that it is taking its toll and could harm his prospects.

Inevitably, Labour’s turmoil has become linked to Corbyn’s survival prospects as leader. Plenty of Labour MPs have never accepted the huge mandate he won from party members only eight months ago. Even before the current controversy, the air in Westminster was thick with talk of plots to remove him after the June EU referendum.

The Labour leader needs a victory in London to keep his critics at bay. His uncertain handling of the anti-Semitism row has fuelled doubts about his competence. The inquiry he set up on Friday is welcome, but should have been announced several weeks ago when the problem first emerged. Corbyn has a strong track record as an anti-racist campaigner but gives the impression of being a leader who acts reluctantly if it might offend his natural allies. But leadership sometimes requires exactly that – and a level of professionalism and competence he has not yet shown. If the grassroots members who flocked to Corbyn’s banner last year turn against him, it will not be because of his left-wing views but because they think he is not up to the job. Poor results on Thursday would help to build such a picture.

It is ludicrous to claim, as some Corbyn allies do, that the anti-Semitism row has been cooked up by “embittered old Blairites”, the Tories and right-wing newspapers. This controversy was stoked not by Corbyn’s enemies but his friend Ken Livingstone, who is unrepentant. Remarkably, he has apologised to Corbyn but not for his highly offensive claim that Hitler supported Zionism. Dismissing the problem as a few anti-Semitic tweets from a handful of people, as Diane Abbott argued yesterday, will not convince anyone that Labour is serious about tackling it.

Inevitably, the Conservatives have moved to exploit Labour’s woes, with Boris Johnson claiming that Khan is part of the same “ideological continuum” as Livingstone and Corbyn. But the Tories have nothing to crow about. From David Cameron downwards, they have fought a nasty and desperate campaign in London against Khan, a moderate Muslim, by attacking his alleged links to Islamic extremists. The links are tenuous. Indeed, Zac Goldsmith, the Tories’ mayoral candidate, has met one of the extremists linked to Khan, Suliman Ghani, who campaigned for the Tories at last year’s general election and fell out with Khan over his support for same-sex marriage. There are plenty of legitimate lines of attack to deploy against Khan, who nominated Corbyn as Labour leader before distancing himself from him and changed his mind to oppose a third runway at Heathrow. But the Tory campaign in London has crossed a line. Cameron’s commitment to One Nation seems to be put on hold at election time. It is grubby politics.