Authorities in Madrid and Gibraltar gave differing versions on Monday of an incident in which a Spanish warship told commercial ships to leave anchorages near Gibraltar, the latest example of tension over the strategic port as Brexit approaches.

In toughly worded statements, Gibraltar said a Spanish warship ordered commercial ships to leave anchorages in British waters near Gibraltar, adding it was challenged by the British navy and sailed away, while the commercial ships stayed put.

The Spanish government said the commercial ships were in Spanish waters and they left the area after being contacted by the Spanish warship.