Spain has closed its airspace to US planes involved in attacks on Iran, Madrid's defence minister Margarita Robles has said.

We will not authorise the use of Moron and Rota [military bases] for any acts related to the war in Iran, she said, adding that Spain had made this clear to the American government from the beginning.

Foreign affairs minister José Manuel Albares stated the aim of the decision was to not do anything that could encourage an escalation in this war.

The US did not immediately comment but President Donald Trump has previously threatened to impose a full trade embargo on Spain over its opposition to the Iran war.

Since the start of the war in late February, the Spanish Prime Minister Pedro Sánchez has been one of the most vocal opponents of the US and Israeli attacks on Iran, describing them as reckless and illegal. Earlier in March, Sánchez denied the US use of the two jointly run military bases at Rota and Morón, both in Andalusia.

Last Wednesday, he also announced that all flight plans that involved actions related to the operation in Iran were rejected - every single one of them, including those of refuelling aircraft.

Planes taking off from the UK will now likely have to bypass much of the Iberian peninsula - either by flying over the eastern Atlantic or over France.

In a televised address on 4 March, Sánchez reflected on the wars in Ukraine and Gaza, summarizing the Spanish government's position as no to war.

Last week, the Iranian embassy in Spain indicated readiness to cooperate with Madrid regarding transit through the Strait of Hormuz, recognizing Spain's commitment to international law. The Strait is critical, with around 20% of the world's oil supply typically passing through it.