“We have a lot of winners, but Spain is a loser,” US president Donald Trump told The New York Post this week.

It was his second such outburst against the country in the space of three days. On Tuesday, he had threatened to cut off all trade with Spain because it had refused to allow him to use two military bases as part of the US offensive on Iran.

The Spanish government of Socialist Pedro Sánchez had described the venture as an “unjustified and dangerous military intervention”.

And, as he hit back at Trump’s trade threats, Sánchez said the main task for any government was to improve people’s lives.

“And it is absolutely unacceptable that those leaders who are incapable of fulfilling that objective should use the fog of war to hide their failure while lining the pockets of a few – the same ones as always,” he said.

This was the latest instalment in a relationship between the two leaders which has been rapidly deteriorating in recent months. But, as Spaniards wait to find out what economic reprisals, if any, Washington imposes on them, the episode has highlighted Sánchez’s status as Europe’s most staunch opponent of Trumpism.

“This is the riskiest move [Sánchez] has made on the international scene,” noted Lola García, a political commentator at La Vanguardia newspaper. “And right now the consequences are impossible to predict.”

Sánchez’s decision to stand up to Trump contrasts with the position of Europe’s other major economies. France, Germany and the United Kingdom made a joint statement on Wednesday promising “to work together with the US and allies in the region on this matter”.

Spain's prime minister Pedro Sánchez. Photograph: Anna Moneymaker/Getty Images

Spain’s prime minister Pedro Sánchez. Photograph: Anna Moneymaker/Getty Images

Spain says ‘no to war’ in response to Trump threatsOpens in new window ]

Meanwhile, Italian prime minister Giorgia Meloni is performing a balancing act as she pledges not to be sucked into the conflict despite her careful efforts to cultivate a strong relationship with Trump.

Spanish foreign minister José Manuel Albares insisted Spain’s position is consistent with its overall foreign policy. “Very few countries in the world can say that,” he said, adding “we have a coherent voice in the world that all countries acknowledge and we will continue to have one, whether some people like it or not.”

Madrid’s tensions with Trump started in the middle of last year, when Sánchez rejected the president’s demands that Nato members drastically increase their defence spending to 5 per cent of GDP.

The organisation agreed to make Spain an exception when it came to reaching the target, but Trump has since repeatedly singled the country out, calling it “a laggard”, complaining it made him “very unhappy”, and even suggesting it should be expelled from Nato.

This week, Trump again cited the defence spending issue as he lambasted the country’s refusal to support his war effort. The German chancellor Friedrich Merz, who was sitting next to the president at the time, supported him with the words: “It’s correct, Spain is the only one who is not willing to accept that.”

Merz’s decision not to defend a fellow EU member state from Trump’s ire has ruffled diplomatic feathers in Madrid and raised wider questions about the cost of toeing the line when it comes to the US president.

German chancellor Friedrich Merz with US president Donald Trump earlier this week. Photograph: Doug Mills/The New York Times

German chancellor Friedrich Merz with US president Donald Trump earlier this week. Photograph: Doug Mills/The New York Times

In the fallout from the latest Madrid-Washington clash, French president Emmanuel Macron has shown signs of following Sánchez’s lead. Macron called the Spanish prime minister to express his backing in the wake of Trump’s trade threats and has said France will not get involved in the Middle East conflict despite its initial message of support for the United States.

Sánchez’s coalition government was already Europe’s most prominent and outspoken critic of Israel’s actions in Gaza. In 2024, it recognised Palestinian statehood, alongside Ireland and Norway, and last year encouraged street protests against Israel while accusing the country of genocide. In January, Madrid condemned the US military incursion into Venezuela.

Sánchez’s position on Iran can therefore be read, as his foreign minister has asserted, as the continuation of a policy that prioritises legal and humanitarian questions. Pressure from his junior partner, the Sumar platform to his left, undoubtedly plays a role, given its strident anti-war position, which even includes advocating Spain’s departure from Nato.

Josep Martí Blanch, a political commentator at the news site El Confidencial, said that “by acting this way, [Sánchez] is keeping together a coalition government that is prone to ructions when it comes to military issues.”

But Sánchez’s decision to go out on a limb is also driven by the opinion of voters.

As he addressed Spaniards live on television on Wednesday, in response to Trump’s threats, the prime minister referred to the decision by the conservative government of José María Aznar to support the invasion of Iraq, in 2003, despite overwhelming anti-war public sentiment.

Comparing the offensive against Iran to that invasion, Sánchez told viewers it had “made the world less safe and life worse”.

A poll published on Friday by 40dB showed only 23 per cent of Spaniards are in favour of the military offensive by the United States and Israel, with left-leaning voters particularly opposed to it. When put alongside another study by the CIS research centre, which showed 77 per cent of Spaniards have a negative opinion of Trump, Sánchez’s gamble on the international stage makes clear sense in the domestic arena.

“For Sánchez, this is an opportunity to mobilise the left behind a common cause,” said García. “If he had opted to support Trump, his whole foreign policy of the last few months would have collapsed.”

Building an image as an opponent of Trump is particularly welcome for a politician who has been bogged down by problems at home, including a series of corruption scandals affecting close allies and a dysfunctional parliamentary majority.

In Madrid, there is even talk of Sánchez, who is known for often seizing the initiative through surprise announcements, capitalising on his anti-Trump credentials by calling a snap election before the summer.

Martí Blanch suggests Sánchez wants “to set up Trump as a virtual candidate in the Spanish elections and defeat him, in a symbolic way.”

Such a bold move may be a risk too far for the Socialist but, for now, the international stage is providing him with a welcome respite from national politics.

Donald Trump’s pressure-cooker approach to Iran was always going to explodeOpens in new window ]