Spain's foreign minister has accused the UK of "losing their nerve" following suggestions that Theresa May would be willing to go to war with the country to protect Gibraltar.

Alfonso Dastis was responding to comments from former leader of the Conservative party Michael Howard that the prime minister would show the same "resolve" to protect Britain's sovereignty abroad as ex-Tory PM Margaret Thatcher did during the Falklands conflict with Argentina.

Speaking to Spanish media, Dastis said he did not believe Howard was advocating war with Spain but that "someone in the UK is losing their cool and there is no basis for it".

Dastis did say Howard bringing up "past situations" with the Falklands when discussing the issue of whether Spain or the UK will control Gibraltar post-Brexit was "a little out of context".

The issue surrounding control of Gibraltar stemmed from European Council president Donald Tusk indicating Madrid will be given a veto on any trade deal between Gibraltar and the EU after Brexit despite the territory being controlled by Britain since 1713.

Howard told Sky News: "Thirty-five years ago this week, another woman prime minister sent a taskforce halfway across the world to defend the freedom of another small group of British people against another Spanish-speaking country, and I'm absolutely certain that our current prime minister will show the same resolve in standing by the people of Gibraltar."

In a separate interview with Channel 4 News, Howard denied he was suggesting Britain should go to war with Spain, but said he can see "no harm" in reminding the EU "what kind of people we are" during Brexit negotiations.

Gibraltar border Spain
Tourists walk to enter the British colony of Gibraltar at its border with Spain REUTERS/Jon Nazca

Speaking to Radio 4's Today programme, former Labour foreign secretary Jack Straw said the idea of Britain going to war with Spain over Gibraltar is "frankly absurd and reeks of 19th-century jingoism". Dominic Grieve, chairman of the Intelligence and Security Committee, also condemned Howard's remarks as "apocalyptic".

Gibraltar's chief minister, Fabian Picardo, is also calling on EU leaders to remove all reference from any future draft guidelines as it will not "tolerate being a bargaining chip or a victim" of Brexit negotiations.

UK Foreign Secretary Boris Johnson has insisted there will be no change to Gibraltar's sovereignty without consent. He added: "The sovereignty of Gibraltar is unchanged and is not going to change, and cannot conceivably change without the express support and consent of the people of Gibraltar and the United Kingdom, and that is not is going to change."