The year is 1997. Labour's John Smith is swept to power in a landslide victory. So what happens next? Francis Beckett imagines the scenario

How different a world would we be living in if Rab Butler had become prime minister in January 1957 instead of Harold Macmillan? If Lord Halifax had deprived Churchill of the job in 1940? If David Miliband had stood against Gordon Brown in 2007 and won?

I asked 14 politicians, political journalists, historians and lobbyists to describe their fantasy premiership for a book. To gain admittance to the ranks of nearly-PMs, there had to be a moment when, if events had unfolded slightly differently, you would have had the job. Just being Labour or Conservative leader didn't hack it – there was never a moment when anyone thought Iain Duncan Smith might become prime minister someday soon.

History really is changed by the chance of who happens to get to the top – especially in Britain, for our system allows the prime minister to dictate the political weather more than in most western democracies.

I kept John Smith for myself. I imagined that after Smith recovered from his 1994 heart attack, he faced continued sniping from some of his shadow cabinet. To say that the baby boomer generation of politicians such as Blair were hungry for power doesn't cover it. It was not the sort of hunger you feel when you've gone without lunch, but the sort you feel when you missed out on the last crust of dry bread and sip of water.

In this alternative reality, they urged frantic action to distance their party from outdated notions of equality, many of them not far short of 100 years old, dating back to strange folk in frock coats with odd-sounding names such as Keir Hardie. They were frustrated that Smith never seemed to understand what could be gained by attacking the trade unions, thus showing the middle classes that he was on their side. Nothing was done about the anarchic system by which any constituency Labour party or trade union could get its pet motion on to the annual conference agenda. Labour's conference was still capable of doing something unscripted. They could not understand why Smith's appetite for constitutional Labour Party reform seemed so easily sated.

They called themselves "the modernisers" and they worried themselves sick.

Smith's massive 99-seat majority in the 1997 general election silenced his critics. Privately, the modernisers claimed it could have been twice as big if their prescriptions had been adopted, but even if true, it did not seem to matter: 99 was good enough for most people.

It was certainly enough for Smith to take a few instant decisions without much controversy, such as cancelling a now long-forgotten proposal to build a vast round shed in Greenwich, south London, which the Conservatives had planned as a symbol for the millennium, and for which nobody could think of a use.

Michael Portillo had hung on to his Enfield seat – and therefore his right to stand for the vacant Tory leadership – by a handful of votes. Portillo rattled the prime minister when, as opposition leader, he went soft and liberal and cuddly, occasionally sniping at Smith from the left. Portillo even argued that the battle between left and right was out of date, and talked about something called a "third way". Labour's home secretary, Tony Blair, was put up to attack it, and, in an uncharacteristically irritable speech, called the third way "vacuous".

Chancellor Gordon Brown was persuaded, against his instincts, to agree to "hypothecation" – earmarking certain taxes specifically for schools and hospitals. Education secretary Ann Taylor ensured that every school was funded at the same level, and none could select the brightest pupils. Relying on a prime minister who thought education in England should be run as it was in his native Scotland, she announced: "There will be no failures, and no schools designed for failures." So delighted was transport secretary Ken Livingstone with his cabinet status that he refused to return to London politics after the government created a new structure of regional and local government.

After Smith was re-elected in 2001, Brown was shoehorned out of the Treasury and became the most reluctant foreign secretary in British history, watching with quiet fury as Robin Cook sat in his old chair at the Treasury and moved with what Brown regarded as imprudent haste into the euro.

To Smith and Cook, there was a political as well as an economic logic in joining the eurozone. It was a statement about who Britain was in the world, and where she stood. Smith did not warm to US president George W Bush, and Bush saw in the prime minister all the vices of louche, lazy, pinkish Europeans. Smith was happy, after 9/11, to send British troops to Afghanistan, but he drew the line at committing himself to war in Iraq, and made common cause with the French.

Long before the 2001 parliament ended, Smith's doctors persuaded him that his heart might not survive the strain of another full term in 10 Downing Street. Brown still seemed the only possible successor. He had the important, though double-edged, support of his old friend Blair, by then out of the running for the top job because his dislike of what he privately dismissed as "the Smith project" had become common knowledge. Blair had been relegated to education, where he was not permitted to change any of Taylor's policies.

Smith gave Brown a week's notice of his resignation announcement. Brown thought only he had been given this head start. But as memoirs started to come out, it slowly became clear that another key figure was also given advance warning.

This was the newly promoted environment secretary, Brown's old nemesis Ken Livingstone, to whose 10-year occupancy of No 10 we owe, among much else, our pedestrianised city centres. Out of government and newly installed at the IMF, Brown waited with growing impatience for Livingstone to bring Britain's ruined economy to Washington and plead for a bailout. Politics has a cruel way with front runners.

The Prime Ministers Who Never Were, edited by Francis Beckett, is published by Biteback at £14.99. To order a copy for £11.99 with free UK p&p go to theguardian.com/bookshop or call 0330 333 6846