The Royal Navy warship HMS Westminster has set sail from its home port heading for Gibraltar amid diplomatic tensions with Spain

HMS Westminster, a type 23 frigate, left Portsmouth naval base in Hampshire, to join nine other vessels taking part in a pre-planned international training exercise called Cougar '13 in the Mediterranean and Gulf.

The exercise comes as Britain threatened Spain with legal action over the "politically motivated" imposition of extra checks on the frontier with Gibraltar.

Download the new Independent Premium app Sharing the full story, not just the headlines

Diplomatic tensions between the two countries continued to grow after Downing Street disclosed it was considering taking the "unprecedented step" on the grounds that the Spanish action breached European Union law.

Sources in London believe the Madrid government is stoking up the issue as a distraction from its political travails, which include accusations of corruption and the continuing pain of austerity measures.

Last week Number 10 claimed David Cameron had secured a promise from his Spanish counterpart, Mariano Rajoy, to scale down the border controls, but the Spaniards immediately contradicted Britain's version of events.

With little sign of an early resolution to the stand-off, there were reports at the weekend of drivers facing a wait of up two hours to pass into the UK overseas territory.

A Downing Street spokesman said: "Clearly the Prime Minister is disappointed by the failure of Spain to remove the additional border checks this weekend. We are now considering what legal action is open to us.

"This would be an unprecedented step so we want to consider it carefully before a making a decision to pursue."

Inside Politics newsletter The latest news on Brexit, politics and beyond direct to your inbox Enter your email address Continue Continue Please enter an email address Email address is invalid Fill out this field Email address is invalid Email already exists. Log in to update your newsletter preferences Register with your social account or click here to log in I would like to receive updates on politics every morning by email Update newsletter preferences

He said: "We feel these delays are politically motivated and totally disproportionate".

Ministers were discussing whether to pursue the issue as a "matter of urgency" with the EU, the spokesman added.

Giles Paxman, Britain's ambassador in Madrid, reiterated the possibility of legal action yesterday during a meeting with Spanish officials.

But Ignacio Ibanez, director general for foreign affairs at Spain's foreign ministry, shrugged off the threat.

"We are not worried because we are convinced about what we are doing and we know that the right is on our side," he told the BBC.

The move comes amid an escalating row over the construction of an artificial reef by the Gibraltarian authorities which Spain claims will destroy fishing in the area.

Madrid responded by beefing up border controls, leading to lengthy queues, and suggesting that a €50 (£43) fee could be imposed on every vehicle entering or leaving the territory through the fenced border with Spain.

Reports in the Spanish media have suggested the row could escalate to the United Nations, with Madrid floating the idea of Spain and Argentina presenting a "united front" over Gibraltar and the Falkland Islands.

Argentina is currently a non-permanent member of the UN's Security Council and could use its position to add Gibraltar to its agenda. Its president, Cristina Kirchner, has already renewed demands for talks over the sovereignty of the Falklands.

Meanwhile, thousands of Royal Navy personnel set sail yesterday for a long-scheduled training exercise in the Mediterranean. The Ministry of Defence stressed the timing was coincidental, but Boris Johnson, the London Mayor, said the deployment should send a clear signal to the Spanish.

"Maybe it's just a fluke that HMS Illustrious is about to bristle into view on the southern coast of Spain, complete with thousands of Royal Marines and other elite commando units," Mr Johnson said.

"But I hope not. I hope that one way or another we will shortly prise Spanish hands off the throat of our colony, because what is now taking place is infamous."