LONDON - AFP/Reuters - The row between Britain and Spain over Gibraltar went up a notch on Monday as London said it was considering taking legal action over ‘totally disproportionate’ border checks and Madrid threatened to turn to the United Nations.

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 on Tuesday 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 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,” the spokesman told reporters.

“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.”

On the border issue, 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, 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 also mulling forming a united front with Argentina, which is embroiled in its own dispute with Britain over the sovereignty of the Falklands Islands, or the 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 fishermen.

Writing in The Sun newspaper on Monday, 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 the Cougar ‘13 exercise, which would allow the navy to “hone its world-class maritime skills thousands of miles from home through exercises with a number of key allies”.

The ships will visit a number of ports, carrying out an exercise with the Albanian armed forces before heading through the Red Sea, Indian Ocean and Arabian 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.

Meanwhile British Prime Minister David Cameron said London was considering taking legal action against Spain over the stringent border checks.

The territory, which has a population of 30,000 and relies on tourism, the gambling industry and offshore banking, has been a source of tension since Spain ceded it to Britain in the Treaty of Utrecht 300 years ago.

Spain’s tougher checks at the 1.2 km border have caused long delays for thousands of tourists and local people. Madrid also aired the idea of imposing a border crossing fee and of banning planes using its airspace to reach Gibraltar.

Gibraltarians were granted full British citizenship in 1981 and a referendum in 2002 backed Britain’s rule, with 98 per cent of voters rejecting the idea of shared sovereignty with Spain.

Spain’s Prime Minister Mariano Rajoy spoke with Cameron about the dispute last week and both sides expressed a desire to calm the row, but neither backed down. Both politicians now run the risk of losing face in front of their domestic audiences.

Opposition politicians in Spain have accused Rajoy of using the situation to distract Spaniards from the country’s severe recession and a corruption scandal damaging his political party.

In London, Boris Johnson, the city’s outspoken mayor, waded into the debate, telling Madrid to take its “hands off our Rock”, saying he hoped the planned arrival of British warships in Gibraltar was not a coincidence.

A spokesman for the European Commission Jonathan Todd confirmed on Monday that a team of Commission officials would travel to Gibraltar in September. “They will be there to verify compliance with EU rules on frontier controls,” he said, adding it wasn’t clear yet how many EU officials would be involved.