There is the prospect of another vote before the year is out after Cameron's Conservatives fail to gain an absolute majority.
The UK election: excitement, drama, just no winner
London // After the most tense and exciting election campaign in decades, a night of extraordinary fluctuation confirmed not only that Britain had been left with a hung parliament, but that it may have to go through it all over again. The inconclusive outcome, expected but also feared by many observers, became a reality shortly after 9.30am, UK time. David Cameron's Conservatives had already amassed by far the greatest number of votes and constituencies, but could no longer reach the magic figure of 326 seats for an absolute majority.
The focus switched to Nick Clegg's Liberal Democrats, bitterly disappointed by their own reduced number of seats but still holding the balance of power. While Conservatives protested that the popular vote gave them the moral right to govern, Gordon Brown's Labour insisted it had more common ground with the Lib Dems. Crucially, he pledged immediate legislation on the "fairer electoral system" demanded by Mr Clegg, including a referendum on the form it should take.
Mr Cameron countered with a "big, open, comprehensive" offer to work with Mr Clegg. He did not go as far as the prime minister on electoral reform, suggesting only an all-party committee of inquiry, but moved towards Lib Dem aspirations on employment taxation and other policy areas. The rival bids for Mr Clegg's support left ample scope for the horse-trading already under way. Earlier, during a night of wildly varying voting patterns, competing hopes had at times been raised and dashed with successive declarations of individual constituency results.
But as Britons who did not stay up all night awoke, it was to news that the national picture was remarkably similar to what the exit polls had projected immediately after polling stations closed: the lion's share of votes and seats for the Tories, but not quite enough for Mr Cameron to govern alone. In several areas, counting had begun with hundreds of angry people still locked outside and unable to cast their votes as polling stations were swamped by a late rush, with insufficient staff - or even ballot papers - to cope with a high turnout. The chaos was described by frustrated voters as scandalous, and legal challenges may result in closely fought constituencies. As counts were declared, the signals from party leaders were as confused as the shifts in voting patterns.
Mr Cameron marked his own re-election, in the Oxfordshire seat of Witney, with a 3am proclamation that it was "already clear that the Labour government has lost its mandate to govern this country". But 90 minutes earlier, the prime minister Gordon Brown - who substantially increased his own majority in Kirkcaldy and Cowdenbeath - said it remained his duty to play a part in "Britain having a strong, stable and principled government".
The first hung parliament since 1974 seemed a strong likelihood immediately after the 10pm deadline for voting as exit polls suggested the Conservatives would fall 19 seats short, later revised to 21, of forming a working government. Huge swings to the Tories in the opening results from Labour heartlands in north-eastern England had led to speculation that Mr Cameron was, after all, heading for 10 Downing Street without the need to entice a coalition.
And by 1.30am, shortly before Mr Brown's apparently defiant speech, the former Labour home secretary David Blunkett was admitting: "My instinct is that we regrettably have lost the election." But the Conservatives were denied outright victory by an inability to capture some of its chief targets. Mr Clegg's instinct was to talk first to Mr Cameron. He said on his return to Westminster that the Tories, with the highest number of votes and seats, had the "first right" to seek to govern on its own or with others. However, Mr Cameron's hostility to the electoral reform sought by Mr Clegg, and Labour's willingness to make concessions, made it hard to predict when the uncertainty would end.
This, hour by hour, is how the story of Britain's election night unfolded: 2200 Exit polls project a hung parliament. The prediction, based on a survey of 18,000 voters at 130 polling stations, gives the breakdown as: Conservatives 307 (210 in the 2005 election); Labour 255 (349); Liberal Democrats 59 (62); others 29 (29). Immediate reaction ranges from Tory confidence that the country has emphatically rejected Gordon Brown to Labour relief at avoiding the worst-case scenario of being placed third behind the Lib Dems. For Nick Clegg, the predicted loss of seats is a body blow.
*With early reports of a high turnout, officials in the north-eastern English constituency of Houghton and Sunderland South admit that the heavier ballot boxes will stop them breaking their own record for the fastest completion of a count (just under 43 minutes). 10.52pm Back in Sunderland, Bridget Phillipson becomes the first candidate to be declared an MP, winning the safe Labour seat. Her victory was never in doubt, but the swing to the Conservatives is 8.4 per cent. Repeated nationally, says Vernon Bogdanor, professor of government at Oxford University, this would hand the Tories a working majority.
11pm Labour concerns deepen as another Sunderland seat returns a Labour MP but with a mighty 11.6 per cent swing. *George Osborne, the Conservative's shadow chancellor, hails a "decisive rejection" of Mr Brown even though the new seat of Sunderland Central returns a Labour MP, the swing reducing dramatically below five per cent. Midnight ITV reports the blogosphere buzzing with complaints from frustrated voters turned away from polling stations.
*Mr Brown is described as in no mood to concede defeat, though his party accepts the Tories have won more votes. Lord Mandelson, the business secretary, points out that if parliament is hung, the sitting government has the constitutional right to "first shot" at a coalition. *Further Labour victories recorded in safe northern seats, but with swings to the Tories exceeding nine per cent. David Cameron arrives at his own count smiling broadly.
1am A new twist has pundits speculating that an overall majority for the Tories may be feasible. Kingswood, outside the top 116 targets for a Tory working majority, is gained from Labour. But failure to win other key targets shows the shift between the parties is not uniform. *The first concession: David Blunkett, once a senior Labour minister, says: "My instinct is that we regrettably have lost the election." He urges a union of anti-Tory forces to "minimise the damage they can do".
*But Mr Brown refuses to acknowledge defeat nationally and declares a duty to "play my part in Britain having a strong, stable and principled government". 2am As Tories suffer more setbacks in target seats, the spectre of a hung parliament looms again. Almost immediately, two Tory gains in Wales - including the toppling of a high-profile Lib Dem, Lembit Opik, with a 13 per cent swing - makes analysts think again. Then victory in the marginal English seat of Basildon South is tempered by failure to seize a notable Lancashire target, Bolton North East.
3am David Cameron says: "It is already clear that the Labour government has lost its mandate to govern this country." He hails his party's biggest gains in 80 years and says Britain has voted for change and new leadership. 4am Two former Labour home secretaries are among the party's grandest casualties. Jacqui Smith, who was forced out of office by the expenses scandal, loses her seat to the Conservatives. Charles Clarke is ousted by the Lib Dems.
5am Nick Griffin, the leader of the far-Right anti-immigration British National Party concedes defeat in the east London seat of Barking, a crushing rebuff leaving him in third place, 18,000 votes behind Labour's Margaret Hodge, the culture minister. 6am The Greens have their first MP, Dr Caroline Lucas gaining Brighton pavilion from Labour. 8am Comments by Lord Mandelson hint at a Labour charm offensive on the Lib Dems.
9am Eleven hours into the count, the election has been neither conceded by Mr Brown nor claimed by Mr Cameron. Soon after 9.30am, parliament becomes officially hung: it is mathematically impossible for Mr Cameron to gain the 326 seats required for an absolute majority. 10am Nick Clegg talks of the Tories' greater right to seek Lib Dem co-operation in government, but wants action on the "broken" electoral system and a commitment to govern "in the national interest".
11am Downing Street says officials have been told to initiate procedures aimed at forming a coalition government. 1.40pm Mr Brown emerges from No 10 to promise "immediate legislation", including a referendum, on how to reform the voting system - if Mr Clegg cannot first reach agreement with Mr Cameron. An hour later, Mr Cameron makes his own pitch, offering the Lib Dems important compromises on specific policies but only an all-party committee on changing the way the country votes.
On the lawn outside Britain's seat of government, commentators are already talking about another election before the year is out. @Email:firstname.lastname@example.org