Fair enough I always thought the sanctions were UN sanctions but yes it seems they are EU ones though the removal of the UN sanctions was conditional on the nuclear deal which has been broken... Wasn't the Iranian ship in British waters anyway?
The Spanish claim that the Iranian vessel was in Spanish waters. Regardless, it was still illegal to seize the vessel since freedom of navigation applies. The UK is on extremely shaky legal ground. I would not be surprised if the Iranians take the government to court and win an enormous settlement, courtesy of the British taxpayer. You'd have thought that this government would have learned from it's recent payout to Iran's Mellat bank:
https://www.ft.com/content/58c4ae5c-91b0-11e9-b7ea-60e35ef678d2
The US withdrew from the deal and so it is the US that is non-compliant. Following this, Iran now has no obligation to abide by the JCPOA. The JCPOA explicitly allows for Iran to withdraw from its commitments in the event that any other party is non-compliant. Iran is therefore now only required to comply with international law, which prohibits NPT signatories from acquiring nuclear weapons. As far as I am aware, the IAEA have not indicated that Iran is violating the NPT and so they continue to meet all their commitments.
The UN sanctions on Iran were a response to a belief/suspicion that Iran was covertly developing nuclear weapons in contravention to the NPT, which it had no obligation to sign in the first place. We know, for example, that India, Pakistan and Israel acquired nuclear weapons and did not sign the NPT, but have so far escaped without consequence. Nuclear-related sanction have always appeared entirely politically motivated, where one rule applies for some and not for others. It is the Americans that seem to act as judge, jury and executioner. They are able to steamroll other nation states at the UN by coercing them at the threat of third party sanctions.
In any event it doesn't excuse the stupidity and tit for tat on all sides. Trump has been the ultimate moron in all of this but he has to come to the table. In the meantime we still can't allow Iran to startup a nuclear weapons program or act aggressively unchecked.
I think Iran would be extremely unwise not to procure nuclear weapons. History shows that it is the only means of deterring aggression from the more powerful nation states. North Korea aside, which is limited by its second-strike capability, the US would not threaten to "obliterate" China or Russia. The US would not have invaded Afghanistan, Iraq, Libya or Syria if they had nuclear weapons. Russia would not have invaded Crimea if Ukraine had not given up its nuclear weapons. The US would not be threatening Iran if it had nuclear weapons. It is clearly in Iran's interests to procure the means of defending itself against a far larger and more powerful hegemonic regime that has surrounded it with military bases on all sides and threatens its destruction on a daily basis. In any case, the NPT is an illegitimate construct at this moment in time. The NPT requires the current nuclear states to reduce their nuclear-weapons to zero. Given that no nuclear state is even intending to abide by their commitments, why should the non-nuclear signatories to the NPT abide by their commitments?
The solution is simple: The UK releases Iran's vessel which it illegally seized whist Iran, as a gesture of goodwill, releases the British-flagged vessel. The US returns to the JCPOA whilst Iran returns to meeting its commitments under the deal. In both cases it is clear that the US and UK have intentionally caused the crises. I think the UK will eventually back down, because it stands to lose far more and it has no ability to coerce Iran through military means. The nuclear issue will be resolved if and when the Democrats win back the presidency.