The European Commission has warned Spain against imposing an entry tax into Gibraltar, saying it would be illegal under EU law.
Spokesman Olivier Bailly said on Monday that the entry tax suggested by Spanish Foreign Minister Jose Manuel Garcia Margallo would "be illegal under EU law".
His statement came amid escalating tensions between Spain and the UK over Gibraltar. Spain has already introduced tough border checks that lead to hours-long waits by those crossing.
That was in response to Gibraltar's construction of an artificial reef, which Spain says affects its fishermen. Gibraltar's chief minister, Fabian Picardo, says the reef protects fish stocks from being over-exploited.
On Monday, a British Royal Navy warship arrived in Gibraltar for what the British government said was a planned naval exercise in the Mediterranean.
"We hope Britain and Spain would be able to resolve their latest dispute over Gibraltar by themselves," Bailly added.
Jose Manuel Barroso, president of the EC, was to discuss the row with the Spanish Prime Minister Mariano Rajoy by Monday. He spoke to British PM, David Cameron, last week.
Rajoy has defended the border controls, saying they are needed to combat drug and tobacco smuggling, adding that the checks were in line with security policies employed by member countries of the Schengen free travel zone.
Britain and Gibraltar are not part of the Schengen agreement.
Gibraltar has accused Rajoy of using the reef dispute to deflect domestic attention away from Spain's severe economic crisis and allegations of corruption involving his ruling Popular Party.
Spain ceded sovereignty of Gibraltar to Britain in the Treaty of Utrecht in 1713, but has persistently sought its return.