The Spanish navy has been accused of attempting to provoke British forces by sailing a ship near Gibraltarian waters playing the Spanish national anthem.

The Spanish ship, a Descubierta-class corvette dating from 1980, allegedly sailed through the waters close to the Rock in what would be an illegal act. The stunt is the latest incident in the 300-year-old dispute between Britain and Spain over the territory.

Footage posted on social media purports to show the Infanta Elena manoeuvring near the coast of Gibraltar and the Spanish national anthem can be heard. The passage of the Spanish ship was recorded by a local Twitter user on the afternoon of December 4.

The Royal Navy ships of the Gibraltar Squadron are often called into action to intercept Spanish naval vessels that have manoeuvred too close to the British territory.

The Telegraph understands that there was confusion around the use of loudspeakers, with one report suggesting no music had been played and that the video evidence had been doctored.

Spanish actions in and around Gibraltar are frequent. Last month a Royal Navy vessel fired a warning flare after a Spanish Guardia Civil vessel got too close to nuclear submarine HMS Talent.