Spain is accused of raising tension with Britain to divert attention away from its own problems.

Britain warned Spain on Monday that it was prepared to take legal action to force it to abandoned tighter border controls near Gibraltar in what was described as an “unprecedented” step against a European ally.

Earlier in the day, the British warship HMS Westminster set sail for the British enclave as part of an annual military exercise in the Mediterranean while Spain’s El País newspaper reported that the government in Madrid might enlist its former colony Argentina at the United Nations to contest Gibraltar’s sovereignty.

Argentina disputes British control of the Falkland Islands in the South Atlantic Ocean.

In both overseas territories, the populations have voted overwhelmingly to remain under British sovereignty. In a 2002 plebiscite, 98 percent of Gibraltarians voted down a shared sovereignty arrangement between Spain and the United Kingdom. Earlier this year, virtually all inhabitants of the Falkland Islands voted to remain a British dependency.

The government in London says it is examining options through European courts to stop Spain hindering the free movement of people across the border. A European Commission spokesman confirmed on Monday that officials would travel to the area in September to “verify compliance” with European Union rules.

Like Britain itself, Gibraltar is not part of Europe’s Schengen Area customs union. Spain is therefore entitled, if not obliged, to perform full entrance and exit controls.

The peninsula has been a British territory for exactly three centuries. Spain tried to reconquer it several times and formally reasserted its territorial claim during Francisco Franco’s dictatorship in the 1960s. The country recently stepped up checks at the border, causing long delays for tourists as well as Spaniards living nearby who work in the area. Spain has also suggested that it might impose a border crossing free and ban planes using its airspace to reach Gibraltar.

Tension was supposedly stirred when Gibraltarian authorities dumped seventy concrete blocks near Spanish waters to create an artificial reef. Spain denounced the action, saying that the blocks had been dumped “without any type of authorization and breaking several environmental norms.”

Spain claims the enhanced border checks are a legitimate response to prevent money laundering and tobacco smuggling. However, British commentators as well as opposition politicians in Madrid suspect the government there is trying to divert public attention from a corruption scandal besetting the prime minister and his party as well as the nation’s lackluster economic performance. London’s conservative mayor Boris Johnson made the argument in The Telegraph newspaper on Sunday when he compared the harassing of Gibraltarians at the border to Argentina’s ill-fated invasion of the Falklands in the 1980s.

Forget all this palaver about a few concrete blocks that have been dumped in the sea. That isn’t why the Spanish are going back to the Franco-style blockade. This isn’t a row about fish. I am afraid that this is a blatant diversionary tactic by Madrid and though it would be ludicrous to compare the Rajoy government with the tyranny of General Galtieri and his invasion of the Falklands, the gambit is more or less the same.

The former Royal Navy base, renowned for its Rock that guards the narrow Strait of Gibraltar, has a population of under 30,000 and thrives mainly on financial and online gambling services as well tourism.