The unexpected Tory victory in the general election confirms what will be one of the greatest foreign policy challenges to face the Cameron government over the next few years: that of a referendum on Britain's continued membership of the European Union.

In the run-up to the vote on 7 May, some parts of the European press who did not swallow the standard Foreign Office brief that the Tories would not seize power wrote of the fear in Brussels that David Cameron would once more be prime minister. The fear is because he is obliged to grant that referendum.

David Cameron
'Some parts of the European press wrote of the fear in Brussels that David Cameron would once more be prime minister'Getty

And although the one certainty of the campaign that leads up to it is that Brussels will throw an incontinent amount of money at the side that advocates staying in, the "fear" is they will not prevail and Britain will go – taking with it a substantial amount of net contribution to the EU's funds.

Cameron was a special adviser to Norman Lamont during John Major's government and he saw first-hand what happens to a prime minister, and a Conservative Party, who upsets its Right over Europe.

If anything, the centre of balance for the Tories has moved to the right since the day in 1993 when the Maastricht Treaty was approved and Cameron is held in so little affection by that section of his party – despite the victory he has just delivered to them – that they would not shrink from making his life difficult over the question. He has been unequivocal about his determination to campaign for continued membership. However, the big decision he has to make is whether to make that party policy.

In 1975, when we last had a referendum on the question, the then prime minister, Harold Wilson, allowed not just his MPs but also members of the government to vote and campaign on whichever side they liked. This was a sensible move, since it held together a party with a wafer-thin parliamentary majority and there were no lasting divisions – the party was divided but it was a split that went back to the 1950s between Gaitskellites and Bevanites and their successors, and was not about Europe.

Cameron would be well-advised to follow Wilson's example if he does not want his government to be weakened by mass resignations and a party rebelling against him and sending itself back into indefinite opposition.

He would also be wise, whatever his personal view, to prepare for the defeat of his argument and get Britain ready for a life outside the EU. For the public are largely so fed up with what they see as the overbearing absurdity of Brussels, they could well take the opportunity to get out.

Foreign policy issues to deal with

What happens in Europe will, of course, have an impact on Britain's place in the world. One hears reports coming back from our various embassies around the globe that it is no longer respected as a big player on the international stage.

Its peripheral role in the two big foreign policy questions of the past year or so – the march of Islamic State (Isis) and Russia's belligerence in Ukraine – has come to be accepted as the new status quo by many of the country's allies around the world, not least in America. Those who worry about this diminishing influence will argue it provides an extra, very powerful reason not to leave the EU; but that ignores the fact that influence has diminished even while in the EU and has little to do with its clout as an international body.

British Foreign Secretary Philip Hammond pauses as he speaks during a meeting with Finnish Foreign Minister Erkki Tuomioja (not pictured) in Helsinki, January 8, 2015
'Foreign Secretary Philip Hammond presided in his previous job as defence secretary over the severe diminution of Britain's Armed Forces'Reuters

The real reason is nearer to home. Foreign Secretary Philip Hammond, reappointed on 8 May, presided in his previous job as defence secretary over the severe diminution of Britain's Armed Forces. Not only does it have many fewer soldiers, sailors and airmen than five years ago, it also has fewer tanks, ships and aircraft. Britain is vulnerable and under-defended.

More to the point, any international aggressor looks at Britain and sees a country barely able to stand up for itself, and certainly incapable of standing up for anyone else. Membership of the EU will not affect that. Having a defence review that boosts spending on people and weaponry will.

Until such time as the new government alters its spending priorities, Britain's ability to count in the world will be limited. And that means when its people are outraged at affronts by powerful, aggressive nations or groups against smaller, vulnerable ones, all it will be able to do is voice that outrage rather than have the nation act upon it.

In the now-deceased coalition, Cameron chose not to pursue either a strong defence policy or, as a consequence, a high-profile foreign one. Perhaps that is how his natural instincts were; perhaps it was the fault of the Liberal Democrats to whom he also had to answer. Now, he has to answer only to the Conservative Party and especially to the voters who put him into office without requiring Lib Dem support. They have, I think, higher expectations about Britain and the world and will start to ask more probing questions now.

Dr Simon Heffer is a British commentator and author who has written columns for The Daily Mail, The Daily Telegraph, The Spectator and The New Statesman. He is the biographer of Enoch Powell, Thomas Carlyle and Ralph Vaughan Williams and recently published High Minds: The Victorians And The Birth Of Modern Britain.