The confrontation early on Monday came after the Spanish warship ordered commercial ships docked at a Gibraltar port to leave the overseas UK territory which lies on the southern coast of Spain.
The British media said a military warship was swiftly deployed to the area after the crew of the Spanish warship told the commercial boat to “leave Spanish territorial waters”.
The local government ordered the ship to stay at the port. It accused the Spanish warship of taking “executive action” against the commercial boats anchored on the eastern side of the Rock, Presstv reported.
Reports said the Spanish ship sailed slowly along the Gibraltar coast with its “weapons uncovered and manned” after it was urged to leave.
A spokesman for the British government in Gibraltar described the action by the Spanish army boat as foolish, saying it reflected “the state of extremism of some parts of the Spanish political spectrum.”
“It seems there are still some in the Spanish navy who think they can flout international law,” said the spokesman, adding, “There is only nuisance value to these foolish games being played by those who don't accept unimpeachable British sovereignty over the waters around Gibraltar.”
Spain’s claims over Gibraltar, a territory ceded to Britain in 1713, have been renewed in light of UK’s imminent withdrawal from the European Union. Madrid insists that London should be open to negotiations over the fate of the territory now that it leaves the EU.
Spanish government has boasted of its efforts to force the UK to accept arrangements on Gibraltar as part of a comprehensive Brexit deal signed between London and the EU. However, tensions could escalate if the British government fails to secure the deal in the parliament and leaves the EU at the end of March in a disorderly manner.
UK defense minister Gavin Williamson told the British parliament on Monday that the armed forces will “always” be in Gibraltar to “defend Britain's national interests”.