The apparent intensification of security measures for British vessels sailing in the Gulf region takes place in the wake of attacks on oil tankers by unknown perpetrators and Iran's warnings to London that its ships could be seized in response to the UK's arrest of an Iranian vessel in Gibraltar.
"Capture of the Iranian oil tanker based on fabricated excuses ... will not be unanswered and when necessary Tehran will give appropriate answer", Bagheri said.
The accord between Iran and world powers, the Joint Comprehensive Plan of Action (JCPOA), promised sanctions relief, economic benefits and an end to worldwide isolation in return for stringent curbs on the Islamic Republic's nuclear programme.
"You are an initiator of insecurity and you will understand its repercussions", Rouhani was quoted by the official IRNA news agency as saying Wednesday during a Cabinet meeting, adding that the seizure of the ship was "mean and wrong".
A diplomatic adviser to French President Emmanuel Macron held talks in Tehran Wednesday aimed at saving the 2015 deal.
"You are an initiator of insecurity and you will understand its repercussions", he warned the British government, calling for the "full security" of worldwide shipping lanes.
Other senior Iranian officials have also made direct and indirect threats against the United Kingdom for the seizure of the tanker. In recent weeks, Iran has begun to openly breach limits on uranium enrichment set by the deal in order to pressure European signatories to salvage it.
The tanker's detention comes at a particularly sensitive time as tensions between the USA and Iran grow over the unraveling of the 2015 nuclear deal, from which President Donald Trump withdrew a year ago. But a spokesman for Iran's foreign ministry has told reporters the incident was a case of "piracy" and denied that the 330-metre tanker was taking crude to Syria.
Iran's Foreign Ministry has summoned the British envoy to Tehran three times since Thursday in protest at the United Kingdom navy's move. Iran had earlier summoned the British ambassador over what it called the "illegal interception" of the ship.