Britain’s foreign secretary warned Saturday of “serious consequences” if Iran fails to release a British oil tanker it seized a day earlier in the Strait of Hormuz — but he ruled out “military options.”

The takeover of the Stena ­Impero — which the UK described as a “hostile act’’ — ­escalated already-heightened tensions in the region.

Iran’s Revolutionary Guard posted a video showing speedboats pulling up alongside the ship, Reuters reported.

Troops wearing ski masks and carrying machine guns rappelled to the tanker’s decks from a helicopter.

That was the same tactic used by Britain’s Royal Marines, who seized an Iranian tanker off the coast of Gibraltar a little more than two weeks ago.

Britain Foreign Minister Jeremy Hunt said: “We’re looking at a diplomatic way to resolve the situation, but we are very clear that it must be resolved.

“It is essential that freedom of navigation is maintained and that all ships can move safely and freely in the region,” he added.

Hunt also tweeted that he spoke with Iranian Foreign Minister Mohammad Javad Zarif and “expressed extreme disappointment” that a week after assurances “that Iran wanted 2 de-escalate situation, they have behaved in the opposite way.

“This has to be about actions, not words, if we are to find a way through. British shipping must and will be protected.”

Tehran said Saturday the seizure was in retaliation for the UK’s role in impounding the Iranian ship.

That vessel was believed to be headed to Syria, in violation of international sanctions.

The Stena Impero was seized one day after Britain refused to release the Iranian supertanker Grace 1, which was seized by the Royal Marines off Gibraltar on July 4.

The latest British action in the global oil trade’s most important waterway has been viewed in the West as a major escalation after three months of confrontation that has already taken Iran and the US seemingly to the brink of war.

The Stena Impero had collided with an Iranian fishing boat, Tehran claims.

But London has rejected Iran’s claim that it seized the vessel because of the accidental collision.

The tanker, carrying no cargo, was taken to the Iranian port of Bandar Abbas.

It will remain there with its 23 crew members — 18 of them from India — while the circumstances a are are investigated, Iranian news agencies reported.

With Post wires