British Royal Marines helped the authorities in Gibraltar seize the ship because of evidence it was heading to Syria in breach of EU sanctions.
Spain’s acting foreign minister said the seizure of the ship – Grace 1 – was at the US’s request.
An Iranian foreign ministry spokesman said detaining its tanker was illegal.
Gibraltar port and law enforcement agencies detained the supertanker and its cargo on Thursday morning with the help of the marines.
The BBC has been told a team of about 30 marines, from 42 Commando, were flown from the UK to Gibraltar to help, at the request of the Gibraltar government.
A defence source described it as a “relatively benign operation” without major incident.