During a NATO operation in the Black Sea earlier this year, a British warship was buzzed by 17 Russian military aircraft.

The planes flew within a few hundred feet of the ship but departed without endangering it.

The incident took place in May, but tensions in the Black Sea have been simmering for some time.

Footage released as part of a documentary about life aboard a British warship shows an incident in which 17 Russian warplanes swarmed the Royal Navy destroyer HMS Duncan as it sailed near Crimea in the Black Sea earlier this year.

Russia intervened in Ukraine and annexed Crimea in early 2014, and tensions between Russia and other countries in the West have been elevated since then, particularly in the Black Sea region and eastern Europe.

The Duncan's transit near Crimea, sailing just 30 miles from the peninsula, is the closest any British navy ship has come to Crimea since Moscow annexed it.

A Russian aircraft flies near the Duncan in the Black Sea in May. Channel 5

The incident took place in May, when the Duncan was leading NATO's Standing Maritime Group Two on a tour of the Black Sea, according to Sky News, which on Monday posted a clip of the encounter, recorded as part of Channel 5's four-part documentary "Warship: Life at Sea."

SNMG2 exited the Black Sea after that tour on May 20. (An international treaty limits which warships from countries that do not border the Black Sea can enter it and restricts them to 21 days there.)

Read more: The US Navy is pushing north, closer to Russia and into freezing conditions — and it plans to hang around up there

Commodore Mike Utley, who was leading the NATO group from the Duncan at the time, said in the clip that the British ship was "probably the only maritime asset that has seen a raid of that magnitude in the last 25 years."

"To me it felt unprecedented," said Cmdr. Eleanor Stack, the Duncan's captain. "There were more aircraft than we have seen in a long time."

A British sailor scans radar displays aboard the Duncan during an encounter with 17 Russian aircraft in the Black Sea in May. Channel 5

The clip posted by Sky News shows the Duncan's crew reacting as call signs and bearings are issued for Russian jets as they appear on radar.

"Our long-range radars are picking up air contact. The air team are trying to work out what type of aircraft that contact is and whether or not that contact poses any threat," a British sailor in the Duncan's command center explains.

"The assumption is that they are Russian, because they're coming from Russian airspace and from a Russian point of origin," another crew member says.

Ships from Standing NATO Maritime Group Two, including the Duncan, in the foreground, sailing with ships from Standing NATO Mine Countermeasures Group Two. NATO/Royal navy LPhot Paul Hall

The herd of Russian jets flying out of Crimea — a mix of fighters and fighter-bombers — zoomed over the Duncan, sometimes as low as a few hundred feet, alarming crew members trying to determine whether they were there to attack or just intimidate.

The jets came so close that electronics systems they carried could have been affected by the Duncan's radar, potentially causing a crash.

Read more: These are the 25 most powerful militaries in the world in 2018

Upon departing, one of the Russian pilots sent the Duncan a brief message — "Good luck, guys" — which one of the Duncan's crew members interpreted as a final rattle of the saber.

Utley scoffed at the show of force. "I think their tactics are naive," he said. "What they don't know is how capable the ship is."

A Russian aircraft flying near the Duncan in the Black Sea. Channel 5

"When you see that much activity, I think it reinforces the nature of what people expect at the moment and why there is a challenge from Russia," Utley added.

"They had 17 aircraft. We've got 48 missiles. I think we're going to win that one," a lieutenant commander in the Duncan's command center said in the clip.

The Russian jets departed without incident, but earlier in the deployment the British ship scrambled its Merlin Mk2 helicopter to track down a Russian spy ship detected by the Duncan's radar.

British Defense Secretary Gavin Williamson praised the Duncan's crew members, saying they "epitomized the nation we are going to be as we exit the EU — a truly global Britain."

"As NATO flagship, she has faced down brazen Russian hostility in the Black Sea with jets buzzing overhead, been stalked by Russian spy ships and played a vital role protecting NATO allies during the British, American and French strikes against Syrian chemical weapons facilities," Williamson said of the Duncan.

A Russian Su-27 fighter jet intercepts a US Navy EP-3 Aries reconnaissance plane over the Black Sea in January. Screenshot/YouTube via US Navy

Tensions between Russia and Western countries have led to close encounters on and above the Black Sea.

In July, British fighter jets in Romania were scrambled to intercept a Russian fighter that flew close to NATO airspace over the sea.

Earlier this month, in the second close encounter publicized this year, a Russian jet flew close to a US Navy reconnaissance plane over the Black Sea and suddenly banked right, forcing the US aircraft to fly through turbulence.

Such encounters have led observers to describe a return to Cold War behavior over Eastern Europe.

Read more: The Air Force has picked bases to test its new advanced bomber — here's where the B-21 Raider is heading

While the Russia-NATO rivalry has simmered, Russia's confrontation with Ukraine has heated up in recent days. On Sunday, Russian boats rammed and fired on Ukrainian ships sailing from the Black Sea into the Sea of Azov, which Moscow and Kiev previously agreed to share.

The ships and their crews were seized. Kiev sees the 24 captured men as prisoners of war, while Moscow said they violated Russian borders.

Ukraine on Monday declared martial law in several parts of the country, including areas that border regions held by Russian-backed separatists. The Kremlin warned that it could spark more fighting in eastern Ukraine.