The warship’s crew can be heard in an audio recording of a radio exchange telling vessels anchored at the Rock to leave “Spanish territorial waters”.
Royal Navy boats were deployed in response to the incident.
Boats which were ordered to leave remained at the port during the incident, which was branded foolish by a spokesman for Her Majesty’s Government of Gibraltar.
“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 as recognised by the whole world in the United Nations Convention on the Law of the Sea,” he said.
“It seems there are still some in the Spanish navy who think they can flout international law. This probably accounts for the state of extremism of some parts of the Spanish political spectrum these days.”
The ship was accused by the government of trying to take “executive action” against the commercial boats, which were anchored on the eastern side of the Rock.
Commercial boats which were told to move were ordered to remain by the Gibraltar Port Authority.
A crew member is heard in the recording asking the Spanish ship “to verify you are referring to our ship” because they are anchored in Gibraltar.
“We are not adrift, we are at anchor now,” he says, before being told again to leave Spanish waters.
A statement released by the Gibraltar government said: “The Royal Navy deployed a launch and a rigid-hulled inflatable boat to the scene. After being challenged by the Royal Navy, the Spanish warship sailed slowly along the Gibraltar coast with its weapons uncovered and manned.”
The government sad it was verifying every aspect of the incident in order to ensure that appropriate action was taken as soon as possible.
More about: Gibraltar