It is often said that Ken Livingstone is at his most dangerous if he looks like a martyr. When, in the mid-1980s, Margaret Thatcher moved to abolish the Greater London Council, the "most odious man in Britain" (as the Sun had dubbed him) suddenly became the defender of the capital's democracy, supported by Tory MPs and peers. The same occurred when Tony Blair and Gordon Brown ganged up to stop Livingstone becoming Labour's candidate in the first London mayoral election.

There was another dose of martyrdom more recently when the local government standards board decided to suspend Livingstone from office over remarks to a Jewish journalist on the London Evening Standard. Even many of his worst enemies rallied round to defend him from losing office over what were, at worst, stupid comments. As the 2008 mayoral election looms, there has been a noisy and escalating clamour from the media attacking the London mayor's activities, his choice of advisers and his use of public resources. Some of the mud is beginning to stick.

He has helped turn the London Evening Standard into a key opponent, launching journalist Andrew Gilligan into the side of City Hall several times a week. Readers outside the M25 may not be aware of the huge onslaught raining down on the mayor and his agencies from Northcliffe House. Suffice to say it extends from serious accusations about grants to voluntary organisations through to a totemic war over "bendy" buses.

Unlike the attacks in the 80s, which were almost always from the right, a number of Livingstone's most aggressive detractors are now on the left. Last night's Dispatches programme on Channel 4 was the work of Martin Bright, the political editor of the New Statesman. In yesterday's Standard he declared: "I now believe Livingstone is a disgrace to his office and not fit to be mayor of London. Any Londoner with a progressive bone in his or her body should not consider voting for him." Other high-profile critics include the Observer's Nick Cohen. In his recent years as mayor Livingstone has aggravated a number of people within what might be called the "greater left" by his often controversial approaches to the politics of Islam and race.

Thus, for example, the allegation that the mayor's office used public funds to carry out research to be used to undermine Trevor Phillips's potential role as chair of the Equality and Human Rights Commission has, at its origin, a radically different view of how to approach the issues of race and discrimination in Britain. The picture is made more complex by differences between the mayor's equalities adviser, Lee Jasper, and Phillips, which exist in a dimension of ethnic politics invisible to most commentators.

Looked at in the round, Livingstone is the oddest leading politician in Britain today. His postmodern self has embraced a neo-Thatcherite view of the London economy. He is the developer's friend and a promoter of gleaming towers, and trumpets the benefits of the London Stock Exchange to Chinese and Indian business people. He rarely attacks the ultra-rich who tip their cash into his city. Moreover, he was recently in the headlines as the most doughty defender of the Metropolitan police commissioner, Sir Ian Blair.

On the other hand, Livingstone's core political machine is run by a team recruited from one of the most eccentric corners of the sect-within-a-sect factional left. Having as his closest advisers members of Socialist Action is hardly a threat to British (or London) democracy, but it is a ripe target. Indeed, suspicion of ultra-leftist "fellow travellers" has long generated distaste in the mainstream left and may explain the motivation of some of his new enemies.

There is no doubt that senior Labour figures believe the "loony left" image that hung round Livingstone and other London Labour leaders in the 80s damaged the party's electoral chances. Any suggestion we are heading back to that era will discomfort Gordon Brown.

Notwithstanding his current "trial by media", Livingstone can expect the 2008 mayoral contest to be the tightest election he has fought. He is carrying the dead weight of an unpopular Labour party round his neck. He never says sorry and appears never to regret. But he does need to refresh his team and provide grounds for a belief that his administration is clean and competent. He should get on with the serious job of being mayor, following his own (often sensible) instincts rather then being bogged down by more exotic flights of fancy. Boris Johnson really could now win. Martyr status has worked for Livingstone in the past, but one day it won't.