Lord Dannatt, formerly Britain’s Chief of General Staff, has warned that Conservative voters could defect to Ukip if defence spending is not maintained.

Writing in The Daily Telegraph, he slammed Foreign Secretary Philip Hammond for reportedly saying there were “no votes in defence”, describing this as “wrong, complacent and dangerous”.

“It is wrong because in the past few weeks Cabinet Office polling shows that defence as an issue is moving up the general public’s consciousness. It is complacent because it assumes that election strategists are blinkered only to believe in their own previous judgments. And it is dangerous because it disregards the deteriorating worldwide security situation,” he wrote.

“Furthermore, it betrays an attitude that risks not only the security of our country and our citizens at home and abroad – the safeguarding of which is the accepted first duty of any government – but also European collective defence.”

He called for the UK to commit to spending 2 per cent of the country’s gross domestic product on defence, which all Nato members are supposed to do, although many do not.

“A commitment to spending 2 per cent of GDP by all 26 Nato members would significantly increase Western and central European collective defence capability at a time of rising threats on our eastern and southern flanks,” Lord Dannatt said. “While this judgment seems obvious to many security analysts and commentators, it is apparently being ignored by mainstream political decision-makers.”

The UK currently spends 2 per cent but Labour and the Conservatives have not committed to do so after the election. However, Ukip has and Lord Dannatt said this was “something that is attractive to Right-wing Tories who might just be tempted to switch their votes”.

“Surely that alone should catch the attention of Conservative Central Office?” he added.

He said the UK’s military had been reduced to “a surface fleet of just 19 frigates and destroyers, a regular army that will struggle to put a single division into the field and an air force with fewer squadrons than the fingers on two hands”.

“Talking tough with little of substance inside the mailed glove simply lays open the prospect of ridicule from the likes of Putin’s Russia and the so-called Islamic State [Isis], while a noticeable reduction in the forces that we can field brings a disappointed despair to our principal ally, the United States,” Lord Dannatt said.