The row between Britain and Spain over Gibraltar went up a notch as London mulled legal action over "totally disproportionate'' border checks and Madrid threatened to turn to the UN.
As the threats were made over the British-held territory, British warships began setting sail for the Mediterranean for a naval exercise that will see the frigate HMS Westminster dock in Gibraltar.
Helicopter carrier HMS Illustrious steamed out of Portsmouth, to be followed later today by the type-23 frigate HMS Westminster, which is set to arrive in Gibraltar within a week.
The defence ministry has stressed that the deployment of the ships for the exercise is "routine'' and "long planned''.
But in a hardening of Britain's tone, a spokesman for Prime Minister David Cameron said the government was considering taking legal action over the checks by Spanish guards on the border of the rocky outpost on Spain's south coast.
The spokesman said the checks, which have caused tailbacks of several hours for people trying to cross the border, were "politically motivated and totally disproportionate''.
"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,'' the spokesman said, adding that Britain was considering whether to take "unprecedented'' action against a fellow European Union member.
"If we go down this route, we will certainly press the EU to pursue the case as a matter of urgency,'' he added.
But Spain refused to stop the checks, which it countered were "legal and proportionate''.
The threat from London came after Spain said it was considering taking the row over the disputed territory to global bodies such as the United Nations and the International Court of Justice in The Hague.
A foreign ministry spokesman said Madrid was "evaluating the possibility of going to bodies like United Nations (or) the Security Council, the court in The Hague''.
But he said that "no decision has been taken'' on the possible course of action.
In a potential headache for Britain, Spain is considering forming a united front with Argentina, which is embroiled in its own dispute with Britain over the sovereignty of the Falkland Islands, or Las Malvinas as they are known in Spanish.
"There are common elements in the issue of Malvinas and Gibraltar, and elements that are more distant,'' the foreign ministry spokesman added.
The government of Gibraltar has accused Madrid of acting in retaliation after it built an artificial concrete reef which it says is aimed at boosting fish stocks, but that Spain says is designed to keep out Spanish fishing boats.
Writing in The Sun newspaper yesterday, Britain's Europe minister David Lidington said: "Britain and Spain matter to each other. We are NATO allies, key trading partners, and millions of Brits travel to Spain every year.
"But our good friendship with Spain does not mean we will turn a blind eye when the people of Gibraltar are threatened or put under pressure.''
Britain's defence ministry said the vessels heading to the Mediterranean were taking part in an exercise "with a number of key allies''.
The ships will visit several ports, carrying out an exercise with the Albanian armed forces before heading through the Red Sea, Indian Ocean and the Gulf for exercises with other British allies.
Spain ceded Gibraltar to Britain in perpetuity in 1713 but has long argued that it should be returned to Spanish sovereignty. London says it will not do so against the wishes of Gibraltarians, who are staunchly pro-British.
The self-governing British overseas territory, measuring just 6.8 square kilometres, is home to about 30,000 people and is strategically important as it overlooks the only entrance to the Mediterranean from the Atlantic Ocean.