Andrew Grice: His dream of leading a progressive alliance lies in tatters

The game is still in play. There is still a prospect of a Liberal Democrat deal with Labour – but not with Mr Brown

Gordon Brown lost but refused to concede defeat. David Cameron failed to win an election he should have walked. Nick Clegg did badly but held the keys to Downing Street and wasn't quite sure what to do with them.

Welcome to the wacky world of British politics. If I had pocketed £10 for every time in the past 30 years I have heard a politician say our first-past-the-post system delivers decisive results and strong government, I would be a very rich man.

Well, the people have now spoken. They didn't want Mr Brown, as a lot of people in his own party have known for a long time. But they weren't sure about Mr Cameron either. "Vote for change" was the Conservatives' slogan. People did – but not for Mr Cameron. If Labour's failure was to be expected after 13 years in power, the Tories' was not.

For so long, Mr Cameron seemed to be cruising to victory. He talked a good game on "change". He worked tirelessly to bury the Tories' image as the "nasty party". It looked likely to be enough against an unpopular Prime Minister whose party lacked the courage to ditch him. Some fellow modernisers think Mr Cameron took his foot off the pedal, reckoning the game was won, presuming that the official Opposition enjoyed a monopoly of the "change" market. If so, it was a fatal miscalculation. The party leaders' television debates, which Mr Cameron was first to call for in 2005, allowed another player to offer something different – Mr Clegg. The Liberal Democrat leader seized his opportunity in the first debate and changed the terms of political trade. For a while, Mr Clegg could even talk about supplanting Labour without being ridiculed.

Yet it proved to be another false dawn for the third party. During Labour's 18 years in opposition before 1997, there was a joke among party modernisers that they had had "enough brilliant defeats".

The Liberal Democrats know how that feels today. Mr Clegg deserves credit for running a brilliant campaign. But he seemed to run out of steam on the closing straight – not personally, but because of the Catch 22 of the election being fought under first-past-the-post, not the proportional system of Liberal Democrat dreams.

The Tories had a disappointing campaign. Their big idea, Mr Cameron's vision of a "big society", seemed a very small idea on the doorstep. They rushed out a contract with voters, another breach of copyright from the Blair 1997 playbook, which included his pledge card and "contract with the people".

Other changes to the Conservative campaign were made on the hoof without consulting Shadow Cabinet members, fuelling demands yesterday for the Tory leader to adopt a more consensual style. If he becomes Prime Minister, those demands will grow and he will have his work cut out to take his party with him, especially if he flirts with electoral reform as he suggested yesterday in his attempt to woo Mr Clegg.

Labour had a difficult campaign. It had no money, a third of the staff it had at the 2005 election and almost no campaign at all. Lord Mandelson and Douglas Alexander put the Blairite band back together for one last gig. When Labour folk said was it David versus Goliath, they were right. But money wasn't everything and expensive Tory poster campaigns seemed to backfire.

And yet there was no escaping the painful truth that Mr Brown was less popular than his party. Those who said he should be ousted before this election will feel vindicated. Labour's result could have been worse. Mr Brown found his voice late in the campaign, perhaps too late to make a difference when the odds were stacked against him.

It will be remembered for him calling a 66-year-old lifelong Labour voter in Rochdale a "bigoted woman", an incident that one Brown ally described as "the last act in a great tragedy".

Mr Brown, relieved to be still in the game, refused to give up hope of a Lib-Lab alliance yesterday, offering Mr Clegg a much stronger commitment to electoral reform than Mr Cameron. But the numbers seemed stacked against him. Cabinet ministers judged that they needed to keep the Tories to between 290 and 300 seats to make a Lib-Lab deal more viable than a Con-Lib one.

It would have suited Labour for the Liberal Democrats to have done much better in the seats where they did battle with the Tories: another 10 Liberal Democrat MPs could have made all the difference, paving the way for the "progressive alliance" that was always going to be Labour's best hope of hanging on to power.

But the Clegg bubble burst as the voters arrived at make-your-mind-up time. Now Mr Clegg must make his mind up. The game is still in play. There is still a prospect of a Liberal Democrat deal with Labour – but not with Mr Brown, because people did "vote for change".

Mr Cameron's pitch to the Liberal Democrats yesterday was clever but had a hole in its heart – another review of the electoral system that Tory MPs would not allow to go anywhere except the long grass. If Mr Clegg really wants to change the voting system, he will have to do a deal with Labour – and, in turn, Labour will have to persuade Mr Brown to stand aside.