Tony Blair hopes that history will judge him kindly; he knows that this Thursday the British public will not. Labour is braced for a savaging in elections for local councils in England, the Scottish parliament and Welsh assembly. Since most Britons are enjoying unprecedented prosperity their impatience to punish the government is strange.

Only two years ago Labour won a third successive general election. It was a comfortable victory, although turnout was poor. Britain, it seemed, liked having Mr Blair in charge, faute de mieux. That option will soon be gone. At the next election no party leader will call himself a Blairite. But they will promise to combine economic efficiency with a commitment to social justice. They will pledge empowerment to the individual and solidarity to the collective. They will embrace globalisation but warn of its challenges - how it requires reform of the state; how it makes obsolete the old dogmas of left and right.

If that feels like a summary of the politically obvious it is because Tony Blair made it so.

In 1979 Labour was banished from power for 18 years and came close to extinction. Tony Blair turned it into a natural party of government. He drove the Tories into the wilderness, forcing them to accept a new consensus. They now say they would not cut taxes at the expense of funding for schools and hospitals. That was not the view under Margaret Thatcher.

Before David Cameron the Tories attacked Labour with pessimistic whinges: dirty hospitals, marauding criminals and illegal aliens. It appealed to the party's core supporters. But it did not resonate with the country as a whole because it did not describe modern Britain, which is richer, more comfortable with diversity, more tolerant, more confident and in ruder health than it was in 1997. People no longer wait days for a doctor's appointment and months for an operation. Children get better results at school, more of them go to university and go on to find a job. There has never been a recession under New Labour.

But judging by opinion polls, these benefits are taken for granted or are insufficient to earn the government any credit. That is partly because riches have not flowed very evenly. At the top of the income scale grotesque sums are earned and splashed around. At the bottom there is still an underclass, unresponsive to state intervention. That inequality is more visible than the discreet but more widespread increase in average household wealth.

Another problem has been Mr Blair's mismanagement of expectations. Often we have been told how inadequate public services are, and how radically they need to change. But reforms have been gradual and, in the case of the health service, plain contradictory - dismantling and then reinstating the internal market. The effect of this timidity has been to stoke dissatisfaction while ramping up unrealistic hopes for improvement. Public sector workers, who are unquestionably better off under Labour, have had their morale undermined by a government message that portrays them as obstacles on the path to modernisation. The gap between the rhetoric of change and the reality has swallowed much of the government's reformist credibility.

That problem is often attributed to New Labour's love of 'spin' - launching policies with an eye only on the next day's headlines. But that criticism misjudges the challenge that Mr Blair faced in an era of media revolution. He is the first Prime Minister to have to deal with 24-hour rolling news with its insatiable appetite for novelty and fixation on personality. He is the first to govern in the internet age. Had Mr Blair not been a master of information control, he would only have lost power to someone who was.

Another criticism of Mr Blair, often joined to the accusation of spin, is that he lacks ideology. But that has also been a tremendous advantage. His disregard for sacred party positions is what made him a successful peace broker in Northern Ireland. Ulster was a problem that, less than a generation ago, looked intractable. Mr Blair's dogged diplomacy, charm offensive and lack of ideological baggage made the difference. At his best, he is capable of a sort of visionary pragmatism. It is a rare quality in a politician.

When Mr Blair has shown something akin to ideological zeal, in foreign policy, it has caused him political harm. To his credit, he was quick to understand the threat posed by al-Qaeda. He recognised in Islamist terrorism a movement of global proportions that recruited people, including British citizens, and taught them to crave death and make a fetish of war. He rallied the world against the odious Taliban.

But Mr Blair's room for pragmatic manoeuvre in foreign affairs was limited by his partnership with George Bush, the most ideologically driven US President in recent history. Still, the choice to join Mr Bush's war in Iraq was defensible on many grounds: the genuine belief, at the time, that Saddam was a threat; the moral case for unseating a brutal dictator, the long-term importance of unstinting loyalty to the transatlantic alliance. But Downing Street insisted that Mr Blair had to be outspoken in support of George Bush in public so as to better influence his actions in private. Having failed to get clear United Nations authority for the attack, he failed to audit America's plans for post-invasion nation building. As it happens, there were no such plans. So today Iraq is a democracy, but not a happy one. The political freedom Iraqis have can hardly be called a triumph when so many of them lose their lives to senseless violence.

Mr Blair says that much of the violence is fomented by terrorists who share the ideology of the men who attacked the US on 11 September and Britain on 7 July. He is right. But his insistence on seeing problems of the Middle East in purely Manichean terms - as a global struggle between Good and Evil, between Western Civilisation and apocalyptic terrorism does not lend itself to good policy-making. Stabilisation in Iraq, Iran's nuclear ambitions, Israel's war with Hizbollah and its occupation of Palestine - these are problems that require separate treatment. Weaving them into a continuous narrative of a 'war on terror' only legitimises the jihadi world view of Muslims in confrontation with everyone else.

Mr Blair can give the impression of believing that those who are against him over the war are somehow sympathetic to the terrorists. That has alienated voters. It is a blind spot that stops him also from understanding civil libertarian objections to security measures at home. People might despise suicide bombers, yet also think that no one should be subjected to 90 days detention without trial. People might reject identity cards, the accumulation of private data on government computers and the profusion of CCTV cameras on British streets not out of sympathy with criminals, but because those things erode their fundamental rights.

That does not mean Tony Blair's rule has been authoritarian. If anything he has been perpetually frustrated in his ambitions to wield power. His huge parliamentary majority has cosseted systematic back bench rebellion. His rivalry with the Chancellor poisoned relations in the cabinet. It also led to the unseemly manner of his departure - an ugly coup and a nudge into early retirement.

Such dysfunctionality is an electoral turn-off. Voters want to be governed by a party that speaks out to the nation with confidence, not inward to itself with bitterness. That alone cannot account for Labour's anticipated meltdown on Thursday. Perhaps 10 years is just too long. Perhaps it is simply time for a change.

But that means impatience for new faces, not necessarily a new direction. The two political constituencies that have been most hostile to everything Mr Blair does are the unreconstructed left and the misanthropic right, one nostalgic for class war, the other pining for a fictitious idyll of little England.

The overwhelming majority, meanwhile, want neither revolution nor reaction. They like gradual change. And Britain has been discreetly transformed: the minimum wage; free nursery care; tens of thousands more teachers, doctors and nurses - with higher wages; the working families' tax credit; the right to six months' maternity leave and two weeks' paternity leave; a statutory right to flexible working hours; the disability rights commission; the Freedom of Information Act; civil partnerships and the repeal of Section 28; restoring self-government for London; devolution for Scotland and Wales; the Human Rights Act; peace in Northern Ireland. Mr Blair's government has given millions of people unprecedented freedom to live as they choose and given them the wealth and security to do it.

Britain is better off after a decade with Tony Blair in charge. Wealth has been created, and wealth has been redistributed. That is what Labour governments have always hoped to do. It has happened without a brake on global competitiveness. That is what New Labour hoped to do: build a vibrant market economy with a generous welfare state; economic freedom and social protection. That is Blairism.

So on Thursday millions of voters will go to the polls intending to bury the Prime Minister. In time they will find many reasons to praise him.