On the afternoon of Wednesday 23 May 2011, the new Prime Minister David Miliband sat in his office in Number Ten. He was still slightly stunned at how quickly he had gone from being an out-of-favour Foreign Secretary to Prime Minister, with a record-breakingly short stint as Leader of the Opposition in between.

Sure, he'd had to endure some cracks from the new Business Secretary Ed Balls about "caving in to Clegg", but after seeing the Lib Dem leader walk away from coalition talks with David Cameron a year before, he had been determined to conclude a deal that would last. Offering Vince Cable the position of Chancellor was a no-brainer, as was appointing the popular former-Treasury minister John Healey as his Labour "minder" in the role of Chief Secretary. Reworking the spending review in a way which reassured the markets but put greater emphasis on growth and protected more public services was not going to be an easy task. At least they now had the reasonable expectation of four years in government to get the job done.

Nick Clegg had accepted the post of Deputy Prime Minister with a brief to run the coalition's constitutional reform programme -- including a two-stage referendum on whether to keep First-Past-The-Post -- and then a referendum between AV and PR to follow, if it was rejected, an innovation from New Zealand. This was what had clinched the coalition deal for Clegg: Miliband was simply able to go one better than Cameron had a year before, and offer the Lib Dems a shot at their Holy Grail -- PR for Westminster elections. Of course, some resistance to electoral reform persisted among Labour MPs, and the party in the country, but Miliband reckoned that, for most of them, the chance to destroy the Tories would be too good to pass up. Both party leaders were relaxed about winning the first round against what they hoped would be a demoralised Tory-led "Keep FPTP campaign" and a broad coalition of reformers comprising both government parties.

Elsewhere, Paddy Ashdown became Defence Secretary in the Lords, David Laws took Education -- a major spending department, seen as one of the biggest prizes in the coalition deal. Chris Huhne went to Energy, Simon Hughes became Transport Secretary, Sarah Teather went to Culture and Danny Alexander to Scotland. Alistair Darling had graciously agreed to become Foreign Secretary -- a move he had resisted when Gordon Brown had tried it two years before. With Ed Balls at Business, Jim Murphy at the Home Office, Douglas Alexander at Work and Pensions, Yvette Cooper at Local Government, Liam Byrne at Health and Andy Burnham as Party Chair, no one could accuse his government of lacking experience or weight.

The new Prime Minister had more than enough proper work to get on with, but his mind drifted to the more personal task at hand: organising a stag party for his brother Ed, now Environment Secretary. That awkward period when they had both challenged for the party leadership was long behind them -- and fortunately David's victory, while clear, had been close enough to enable both brothers to emerge with pride and mutual respect intact.

A few hundred yards away, Nick Clegg was being applauded into work by staff at the Cabinet Office. It had been quite a day for ovations. Earlier, he'd been carried into Cowley Street by a crowd of activists and welcomed by party grandees including Ming Campbell, Simon Hughes, Charles Kennedy and Shirley Williams. With Liberal Democrat red-lines on student funding written into the Lib-Lab Coalition agreement and the real prospect of getting PR, or at least AV, Clegg was the toast of both his party and the media for the masterful way in which he had played a difficult hand over the previous twelve months. Someone asked him to sign the cover of that week's Economist, which depicted Clegg as a puppeteer, pulling David Miliband's strings, with the headline: "The Masterful Mr Clegg".

Later, sitting behind his new desk, Clegg mused on how tempting it had been to go into government with the Tories in 2010. There had been good arguments either way, and his top team had gone backwards and forwards on it. But the deal just didn't feel right, and, as one of his savvier aides had said to him after he'd finished the last, difficult conversation with a crestfallen Cameron: "Look, it's been 70 years -- we didn't wait this long to make a bad deal. Our time will come sooner than you think." And so it had. Nick Clegg's decision to reject David Cameron's "big, open, comprehensive offer" back in May 2010 had been vindicated.

Meanwhile, the Tory leader sat alone in the kitchen of his Notting Hill home, surrounded by unpacked boxes. Tomorrow, he had to meet the executive of the 1922 Committee, chaired by the Altrincham and Sale West MP Graham Brady, and he was not looking forward to it.

David Mills was a Labour special adviser in government and opposition from 2009-2010. This extract is taken from a new book of political counterfactuals, "Prime Minister Boris and other things that never happened", edited by Duncan Brack, outlining how political history might have been different.

He tweets as @davidmills73