An audio recording released Sunday reveals the tense moments before a British-flagged oil tanker was seized by Iranian Revolutionary Guard forces rappelling from helicopters to the ship's deck.

The Stena Impero tanker "was confiscated by the Revolutionary Guards ... for failing to respect international maritime rules," the Iranian forces said after the seizure Friday. Video posted online showed Iranian soldiers in black ski masks sweeping onto the ship in the Strait of Hormuz.

In the audio recording released Sunday by the security risk firm Dryad Global, the voice of an apparent Iranian official warns the tanker's crew to alter course.

"If you obey, you will be safe," the voice says. "Alter your course 3-6-0 degrees immediately."

The voice of a British naval officer patrolling the area warns that the ship has a right to continue undisturbed.

"I reiterate that as you are conducting transit passage in a recognized international strait, under international law, your passage must not be impaired, intruded, obstructed or hampered,” the British officer says.

The Iranian voice says, "No challenge is intended. I want to inspect the ship for security reasons."

Moments later, the ship was boarded and seized by Iranian soldiers.

Two weeks ago, British marines seized an Iranian tanker off the southern coast of the Iberian Peninsula. That tanker was suspected of breaching sanctions against oil shipments to Syria.

Friday, Gibraltar's Supreme Court ruled that the Iranian tanker could be detained for 30 more days, triggering outrage in Tehran. British Foreign Secretary Jeremy Hunt said he spoke with his Iranian counterpart Mohammad Javad Zarif, who viewed seizure of the Stena Impero as a "tit-for-tat" situation.

"Nothing could be further from the truth," Hunt said. “Our priority continues to be to find a way to de-escalate the situation."

Tensions between Iran and the West, particularly the United States, have steadily risen since President Donald Trump decided last year to pull out of the nuclear pact between Iran and several global powers. A series of confrontations between Iranian naval vessels and oil tankers in the region have highlighted the importance of unfettered shipping through the Strait of Hormuz.

Hunt warned Iran of "serious consequences" if it does not release the ship, but he ruled out "military options."

Zarif blamed Trump's hawkish "B-team" led by national security adviser John Bolton for the heightened tensions.

"Having failed to lure @realDonaldTrump into War of the Century, and fearing collapse of his #B_Team, @AmbJohnBolton is turning his venom against the UK in hopes of dragging it into a quagmire," Zarif tweeted. "Only prudence and foresight can thwart such ploys."

The Revolutionary Guard said the Stena Impero was escorted to Iranian coastal waters in Hormozgan province and its control transferred to the Ports and Maritime Organization for further investigation.

Iran offered multiple explanations for the seizure. Iranian news agencies claimed the ship struck an Iranian fishing boat. The director of the Ports and Maritime Organization's office said he requested the seizure after reports the ship moved in a volatile manner that made the vessel prone to accident, Iran's Fars News Agency reported.

FNA claimed the British ship switched off its tracking systems in violation of maritime rules and made an entry from the south, disregarding the established procedures that require all entries be made through a northern pass.

A statement from Stena Bulk, which owns the seized tanker, said the ship had 23 crew members aboard from India, Russia, Latvia and the Philippines.