THE UK has threatened Spain with legal action over Gibraltar as thousands of Royal Navy personnel set sail for the Mediterranean.

With tensions between Madrid and London heightened, what started out as a dispute over fishing rights continued to escalate yesterday.

Downing Street's threat to sue, over what it said were politically motivated border controls, came just a day after Spain suggested it could join forces with Argentina and take its dispute with the UK to the UN Security Council.

Against this backdrop, the ­helicopter carrier HMS Illustrious sailed from Portsmouth and headed for Spain en route to the Mediterranean for a training exercise.

The frigate HMS Westminster will leave Portsmouth today and will make a visit to Gibraltar before joining up with other vessels.

The Ministry of Defence insists that the deployments are part of a long-planned mission.

However, their presence will do little to defuse tensions in the area.

In recent days Madrid has appeared to escalate the conflict with the UK through beefed up border controls with Gibraltar, creating lengthy queues.

The Spanish government has also suggested that it could charge a €50 (£43.30) fee on every vehicle entering or leaving the British overseas territory.

A Downing Street spokesman said it was considering the "unprecedented step" of legal action after the Spanish government failed to lift the extra controls over the weekend.

He said: "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."

He added that the Tory-LibDem Coalition was considering legal action on the basis that "these delays are politically motivated and totally disproportionate".

The British ambassador in Madrid is understood to be in talks with Spanish officials over the ongoing dispute.

Last week Number 10 thought David Cameron had won an assurance from the Spanish Prime Minister Mariano Rajoy that the controls would be lifted over the weekend.

The spokesman said that was still their understanding of the conversation, even though it was challenged by the Spanish.

Earlier this week the ­Conservative Mayor of London Boris Johnson said he hoped the UK Government would "prise Spanish hands off the throat of our colony".

Mr Johnson, tipped as a future Tory leader, also accused Madrid of employing a series of border checks that were "tantamount to a blockade". The Spanish government had to "stop it all, and pronto", he added.

Reports in the Spanish media suggest Madrid could take the row to the United Nations.

Spanish Foreign Minister Jose Garcia-Margallo is expected to propose both Spain and Argentina present a "united front" on Gibraltar and the Falkland Islands.

The director general for foreign affairs at Spain's foreign ministry, Ignacio Ibanez, said his country was not worried about the UK's consideration of legal action.

He said: "We are not worried because we are convinced about what we are doing and we know the right is on our side."

He said it was "normal" Spain would talk with Argentina about Gibraltar and the Falklands.

A Number 10 spokesman said: "Our position on sovereignty vis-a-vis Gibraltar and the Falkland Islands hasn't changed and isn't going to change."