History imposed on David Cameron the task of persuading the electorate that Conservatives are at home in 21st-century Britain. William Hague, Michael Howard and Iain Duncan Smith were at one in supposing that, overlooked or derided by metropolitan opinion, there was a conservative British majority that viewed the society emerging around them with alarm and indignation. In fact, most voters felt at home in liberal Britain, and the Conservatives went on to three successive defeats. Breaking with his predecessors, Cameron decided that unless the Conservatives identified themselves with the nation that Britain has become they were finished as a party of government. By aligning himself with contemporary British values, he posed a challenge to Labour to which Gordon Brown must now respond.
The next general election will take place against the background of a period of profound social change that goes back to the crises of the Seventies. To a considerable extent, 21st-century Britain is an unintended consequence of Margaret Thatcher. It was Thatcher who, accentuating the impact of global forces that no one controls, dismantled the postwar settlement and created the market-driven society we live in today. She believed that by rejuvenating British capitalism she could revive the stolidly bourgeois Britain she had known in the Fifties; but that country was a product of Labour rule, and the upshot of reshaping public institutions on a market model was to create a society of a kind she had never imagined.
In an essay that had a powerful influence on the intellectual fringes of early Thatcherism, Friedrich Hayek distinguished between two rival versions of individualism - a "true", Burkean variety, rooted in tradition, that accepted the constraints of conventional morality and a "false", Romantic version in which personal choice and self-realisation trumped all other values. Hayek believed that a revitalised free market would bring with it a return to "true" individualism.
Instead, it was a version of Romantic individualism that triumphed. As the imperatives of market choice have spread into every area of social life, personal fulfilment and the satisfaction of desire have become the ruling values. Relationships of all kinds have become looser and social structures have become more negotiable and provisional. In many ways this has been a benign process. As a result we are more tolerant of the varieties of family and sexual life, and less pervasively racist, and although we are perceptibly more unequal we are less obsessed with class than in the past. But the country created by freeing up the market is in many respects the antithesis of the one Hayek and Thatcher aimed to restore. If ever there was such a thing as a conservative philosophy, its central values were social cohesion and cultural continuity in a settled form of common life. Yet when it is released from restraint the market works to unsettle established ways of living. So, far from reviving an older Britain, Thatcher wiped away its last traces.
However, if the freewheeling society we have today is Thatcher's creation, her latter-day followers refuse to recognise the fact. The diehards who make up much of the Conservatives' core support despise and reject the nation she un wittingly created. They believe that by ditching Thatcher's inheritance, Cameron has abandoned anything resembling conservatism; but it was Thatcher who destroyed the old social structures - and with them the possibility of a viable conservative project. Nowhere is this clearer than in the Conservative Party itself. The loosening up of hierarchies that occurred in society at large has been reflected in a parallel dissolution of the Tory culture of loyalty. Before Thatcher, Tory leaders could rely on an ethos that elevated loyalty above ideology. After Thatcher, disloyalty and infighting became defining Tory traits, and every party leader was placed permanently on probation. Mistrusted by his party, Cameron is seen as a traitor to conservative values. But the Thatcherites themselves - with their endemic discontent and doctrinal mentality - demonstrate how unreal these values have become. Early this month, the former deputy leader Michael Ancram urged Cameron to "unveil the party's soul" rather than "trashing" its Thatcherite past. If Cameron follows such advice, the Conservatives will be left stranded on the margins of power in a country they have ceased to comprehend.
Whatever his critics may say, Cameron had no alternative but to remodel his party. His strategy of repositioning his party on the liberal centre ground enabled it to become, once again, a contender for power. The trouble is that the model of modernisation he adopted was already obsolete. By the time Cameron adopted Blairite new Labour as his template, Blair had become a buffoonish figure - a would-be global messiah who engineered the worst British foreign policy disaster since Suez. A more experienced politician might have asked himself whether it was wise to pose as Blair's successor. Cameron might have unseated Blair in a general election run-off; but once Blair vanished from the scene, the Tory leader was left looking dated and redundant.
In the Commons, Cameron goaded Blair with the taunt, "You were the future once." Yet, by modelling himself on Blair, Cameron tied himself to the past. Unprepared for the national sigh of relief that greeted Blair's departure, he seems ill-prepared for the very different style of politics that has arrived with Gordon Brown.
Only a new breed of Conservatives, for whom Thatcher was a chapter in the history books rather than a living presence, could have consigned her to the memory hole with such brisk finality. In this, Cameron's limited political experience has been a source of strength, but passing most of his short political life in Blair's shadow has narrowed Cameron's vision. Blair's decade in power was a by-product of unrepeatable historical conditions. He was able to return Labour to power by accepting many of Thatcher's policies because she embodied the interests and values of a crucial part of the electorate that was ready to transfer its allegiance to him.
By the time Blair left office he represented no one, and the same is true of Cameron today. Like Blair, Cameron moves in a smart, moneyed set with tenuous links to the wider society. Aside from the fox-hunting fraternity - promised a free vote on repealing the ban - it is hard to think of any social group whose concerns Cameron has consistently championed. Even his commitment to green issues, which at one point seemed to be voicing widely felt anxieties, sounds contrived and unconvincing. There is no section of today's Britain where his voice resonates with any particular force.
Cameron's patrician background plainly had a role in his most serious error to date. His in souciant dismissal of an institution that was for generations a hugely important part of British education showed how slender is his acquaintance with the choices most people have to face. Unlike most Tory voters, Cameron has always been able to take for granted the option of educating his children privately. Like a junior colonial officer in the declining years of empire, he seems hardly to comprehend the lives of those he has set out to govern. His stumble over grammar schools was more than a minor slip. It disclosed an amateurish quality in his entire operation, and exposed the vulnerability of a political project that lacks any solid base of social support.
There is a great opportunity here for Gordon Brown. Linked by overlapping social ties and a common proximity to the London media, Blair and Cameron are alike in their detachment from Britain's provincial majority. This is not the disaffected, reactionary rump invoked by latter-day Thatcherites. It is broadly liberal in outlook, but it demands from government some of the qualities that used to be claimed by Conservatives, such as common sense, competence and a cool head in times of crisis. It has no time for Blairite rants about incessant change, nor for the unending stream of ephemeral initiatives that embodied the Blair regime in practice. By distancing himself so sharply from this style of government, Brown has wounded Cameron at his weakest point.
The shift in the public philosophy of the Conservatives that Cameron initiated seems to have started as a psephological gambit, which recognised that the party could not return to power on the back of its core supporters alone and aimed to capture Liberal Democrat votes in about a hundred key seats. As an electoral strategy it has had mixed results, with Lib Dem voters switching to Labour as well as to Cameron's Conservatives. At the same time, large issues have been left unresolved. At present there are at least two tendencies vying for control among the Con servatives. There are neoliberals such as John Redwood, who urge further large-scale market deregulation and hugely reduced government - a programme whose effect would be to impose another revolutionary shake-up on society, and which for that reason has no prospect of being implemented by any government in the fore seeable future.
In contrast there are the neoconservatives, who accept that governments are bound to continue to play a significant role in social welfare and regulating the economy. What these tendencies have in common is that neither can claim to be distinctively conservative - the neoliberals owe more to Hayek (who always denied being a conservative) than they do to Burke, while neoconservatism originated on the American far left. Both are progressive ideologies, which differ from those that prevail on the centre left chiefly by being less realistic and more dogmatic.
The practical problem for Cameron is that neither of these tendencies allows the Conser vatives to make the vital break with the past. If the neoliberal tendency represents a reversion to Thatcherism at its most rigidly doctrinal, the neoconservative wing of the party - to which, in most respects, Cameron himself belongs - offers little more than a continuation of Blairism. These difficulties have been compounded by his most recent turn in which - while talking of the need to repair Britain's " broken society" - he has increasingly reverted to stock right-wing themes such as crime and immigration.
Many commentators have accused Cameron of inconsistency, but his larger error is that of moving back to the reactionary territory that lost his predecessors the past three elections. However dressed up in fashionable jargon, talk of the broken society cannot help harking back to a nation whose passing the majority of Britons do not regret. No doubt concern with crime is widespread, as are doubts about current levels of immigration. But these worries do not add up to anything like a wide sense of social collapse, and most of Britain's voters like the country in which they live. By putting a rejection of that country at the heart of his campaign, Cam eron has fallen into the trap that has snared every Conservative leader since Thatcher. He has failed to reconcile his party to the society she created, while alienating the voters he needs to attract by implicitly condemning the way many of them have chosen to live.
At present, both the parliamentary party and the party organisation are racked by internecine conflicts, and Cameron himself is looking ever more like an opportunist with no settled beliefs. By itself, intellectual incoherence has rarely been a serious obstacle to securing power. When combined with an ill-conceived political strategy, the result can be disastrous. Only months ago Cameron seemed poised to overtake Labour. There is still a chance he could deny it an overall majority in the general election, but with the Tory leader's switch to the self-defeating politics of reaction and Gordon Brown's assured performance as Prime Minister, the initiative has moved back to Labour. Brown's "steady as she goes" brand of government is an ambiguous phenomenon, for though it involves a sharp break with Blair's style, it is premised on continuing with much of the policy framework that was in place when Blair was in power - which itself continued much of Thatcher's. In an irony neatly captured by the tea at No 10, Cameron has been left struggling to manage the party Thatcher nearly destroyed, while Brown is using the Thatcher inheritance to entrench Labour as the party of government. If Brown can convince voters that he has viable new policies - particularly in the areas of energy and the environment - there is every chance Cameron will follow Blair into history's memory hole.
Much now depends on events. Enough has transpired to plant a large question mark over Cameron's project. He aimed to fashion a new centre-right party, but the result has been a continuation of drift and division. A setback in the next general election could turn these divisions into a civil war not unlike the one that engulfed the party when Thatcher was toppled. The difference is that, after Cameron's attempt to impose a Blair-style makeover on the party, it could end up like a failed state - a rabble of rival factions, each claiming to embody true conservatism at a time when such a thing is no longer imaginable.
The stakes could hardly be higher. The upshot of the next general election could be meltdown in the Conservative Party and a long period of unchallenged power for Gordon Brown.
John Gray's latest book is "Black Mass: Apocalyptic Religion and the Death of Utopia" (Allen Lane, the Penguin Press, £18.99)