British warships must be sent to Gibraltar to “protect it from Spain” during Brexit negotiations, a former Ministry of Defence special adviser has said.

Luke Coffey, director of the Allison Center for Foreign Policy Studies, argued the step was needed as part of measures to fend off Madrid’s bid for joint sovereignty as discussions with the European Union continue.

Known as The Rock, Gibraltar lies at the end of the Iberian Peninsula in Spain, but its 30,000 residents have voted several times to remain a British Overseas Territory.

Gibraltar residents in limbo after Brexit

After an overwhelming 96 per cent Remain vote in June’s EU referendum, Spanish foreign minister Jose Manuel Garcia-Margallo swiftly called for the UK to share sovereignty, but the move was snubbed by Westminster.

Mr Coffey said Britain must now act to safeguard Gibraltar’s interests and reassure residents who feel anxious about the outcome of the Brexit vote.

“First and foremost, Theresa May, Boris Johnson, Liam Fox, Michael Fallon, and David Davis should make a joint visit to Gibraltar as soon as possible,” he wrote in Conservative Home.

“The Ministry of Defence should also make a grand gesture by increasing the Royal Navy’s visible presence in Gibraltar. This would send an important message to the Gibraltarians.”

Brexit reactions – in pictures Show all 10 1 /10 Brexit reactions – in pictures Brexit reactions – in pictures Supporters of the Stronger In campaign look at their phones after hearing results in the EU referendum at London's Royal Festival Hall AP Brexit reactions – in pictures Leave supporters cheer results at a Leave.eu party after polling stations closed in the Referendum on the European Union in London Reuters Brexit reactions – in pictures Mr Cameron announces his resignation to supporters Getty Brexit reactions – in pictures Donald Tusk proposes that the 27 remaining EU member states ‘start a wider reflection on the future of our union’ Getty Brexit reactions – in pictures Ukip leader Nigel Farage greets his supporters on College Green in Westminster, after Britain voted to leave the European Union PA Brexit reactions – in pictures Supporters of the Stronger In Campaign react as referendum results are announced today Getty Brexit reactions – in pictures Boris Johnson leaves his home today to discover a crowd of waiting journalists and police officers Getty Brexit reactions – in pictures Leave EU supporters celebrate as they watch the British EU Referendum results being televised at Millbank Tower in London Rex Brexit reactions – in pictures Supporters of the Stronger In Campaign react as results of the EU referendum are announced at the Royal Festival Hall Reuters Brexit reactions – in pictures Supporters of the Stronger In campaign react after hearing results in the EU referendum at London's Royal Festival Hall PA

Accusing Spain of “anachronistic behaviour”, he added: “The UK needs to prepare for the worse. This could include maintaining a robust air bridge if the land border is closed.

“Also, in the event of a border closure by Spain, the UK must be prepared to respond with appropriate, firm, and proportionate measures against Madrid.”

In the wake of the EU referendum result Europe minister David Lidington said the UK would continue to stand beside Gibraltar.

“We will never enter into arrangements under which the people of Gibraltar would pass under the sovereignty of another State against your wishes,” he added.