Ed Llewellyn, David Cameron’s Chief of Staff, sidles into the room with his gaze fixed to the floor – or, rather, to the hand-woven Bukhara carpet (a personal gift to Tony Blair from the president of Uzbekistan). The place: No 10 Downing Street. The time: 8.30pm. The date: November 20, 2014, the day of the Rochester and Strood by-election. The polls will close in under two hours.

‘I’m afraid it’s bad news, Prime Minister,’ he mutters. ‘I’ve spoken to Stephen [Gilbert, the Conservatives’ by-election head]. We’re going to...’ He pauses for a moment, and avoids the ‘L’ word. ‘We’re not going to be successful.’

Cameron casts his eyes upwards, as if in hope of divine intervention. Finding none, he turns to the next best thing. ‘George,’ he says, grimly. ‘The options again.’ The Chancellor glances up. He is one of three others in the room, together with Lynton Crosby, the Prime Minister’s campaigning chief and general svengali, and Michael Gove, the Chief Whip.

Scroll down for video

The by-election will take place in less than a month and the poll shows Ukip, led by Nigel Frage, above, in front

‘Option one,’ he says. ‘We say we are listening to what the British people have to tell us.’

‘In other words, business as usual,’ Crosby interjects.

‘Option two,’ Osborne continues. ‘Make the big speech on Europe. Tough action after the next Election. Details to follow.’

‘Option three,’ Gove cuts in. ‘Act now. Close the borders. Take the wind from Farage’s sails. Put Miliband on the spot. Dare Clegg not to back us. If he won’t, force an Election. Who dares, wins.’ Cameron groans and glances at the office TV.

As if to mock his agony, the live feed cuts to an image of horror: a chortling Nigel Farage, pint in hand outside Rochester Cathedral, bopping with Mark Reckless to the Ukip Calypso. Then it cuts back to Westminster for David Davis, Cameron’s old rival. ‘A no-confidence vote in the Prime Minister?’ he says. ‘I couldn’t possibly comment...’

Now, I concede that the Ukip leader is unlikely to be caught grooving to an allegedly racist song, for which he has apologised – let alone with Reckless, a former Conservative MP and Ukip’s by-election candidate (though, Farage being Farage, you never know). But this scenario is more likely to happen than not. The by-election will take place in less than a month. The polls show Ukip in front.

The Prime Minister has two options for the next Election, stick to his campaign plan, which is to fight the contest on the economic recovery, strong leadership and future tax cuts, or put controlling Britain’s borders at the heart of the Election message

That may change, of course. There could be a swing back to the devil – the Conservatives. Reckless may run into trouble. The Tory campaign machine, which is in fine shape, could win through. But the odds are against it. As matters stand, Farage’s party is set to triumph – in which case, welcome to the Conservative Apocalypse.

Three main questions would follow the return of a triumphant Reckless to Westminster – and the consequent turmoil in the Tory ranks. Which of those options would Cameron take? Could any hold the party together? Would any be enough to stave off defections to Ukip – and, worst of all, a vote of no-confidence in him?

The Prime Minister has a choice for the next Election. The first is to stick to his campaign plan, which is to fight the contest on the economic recovery, strong leadership, future tax cuts and Ed Miliband’s dire personal ratings – all woven together by Crosby under the heading of ‘security’. Tougher immigration control is part of the goods on offer, but it isn’t at the front of the shop window.

The second is to put controlling Britain’s borders at the heart of the Election message. Soft and hard versions have been floated, as shown. The soft one would promise action after the Election – an emergency brake on EU migration, perhaps, as a ‘red line’ in the renegotiation that Cameron has pledged as part of a second term.

The hard version is that words are no longer enough, and that only action will be taken seriously by the voters. It is difficult to see how closing the borders to EU migrants could be either legal or practicable, or both.

The free movement of people is part of the foundation of the EU. To bulldoze it would be tantamount to leaving the EU unilaterally, which is why this option is almost certainly one the Prime Minister won’t take.

He has another danger to shut down. Britain recently opted out of the European Arrest Warrant – the controversial arrangement that empowers EU member states to arrest suspects more easily.

David Cameron's best chance lies in the weakness of Ed Miliband - and that Conservative MPs, recognising this, will stick with him in the hope that most of them will win next May, and that the Tories will return to Westminster as the largest single party.

Having taken Britain out, Theresa May wants to take it back in again. But the Government faces a revolt from up to 100 Conservative MPs. Downing Street is getting restive.

Cameron could take up alternatives floated by campaigning Tory backbenchers, such as the independent-minded Dominic Raab, to negotiate an agreement with other EU countries that would keep British courts out of the jurisdiction of the European Court of Justice. But he is in an exposed position on these manoeuvres: damned if he acts, damned if he doesn’t.

The EU’s new cash grab – its demand for an extra £1.7 billion – has come at the worst possible time. It puts more pressure on Cameron to tear up the campaign grid and go for broke on halting EU migration. That would be strongly welcomed by some Tory MPs, but just as strongly opposed by others.

After Rochester, the apocalypse may yet come knocking on Cameron's door Paul Goodman

Ken Clarke won support after saying, during a recent meeting of Tory MPs, that the leadership had to get back to fighting the Election on ground that is its own (economic recovery) rather than that which is Farage’s (stopping immigration). The row will go on.

This will be so even if no more Tory MPs defect to Ukip, and there is no challenge to Cameron’s leadership. A no-confidence vote is unlikely, even if Farage wins Rochester. Some of the Prime Minister’s Conservative opponents recognise that a challenge could wreck the party altogether. Others want him to take the blame for defeat.

Nonetheless, his position among Tory MPs has never been strong. He failed to gain a majority of their votes in the leadership election that he won. He didn’t win the last Election. And he looks most unlikely to pull off the next one. The distribution of the vote is stacked against the Conservatives. Labour has gained former Lib Dem voters. Ukip is disproportionately winning former Tory ones.

Cameron’s best chance lies in the dire weakness of Miliband – and that Conservative MPs, recognising this, will stick with him in the hope that most of them will win next May, and that the Tories will return to Westminster as the largest single party. It is still likely that they will.