Last week, Spanish Prime Minister Pedro Sanchez said in an interview that the US-Israel-Iran war was a “unilateral war started by two nations” which would “bring an erosion of our welfare state and the middle and working class”. The latest in a line of criticisms he has levelled at US President Donald Trump, Sanchéz has been unabashed in his defiance against Trump’s foreign policy alignments even outside of the Middle East.Famous for having rejected Trump’s demand last year of NATO members increasing defence budgets to 5% of their GDP, Sanchéz had also questioned the validity of the US’ capture of Venezuelan President Nicolas Maduro this January and the subsequent legal proceedings the US initiated against him.Having chosen to speak out against the US’s top brass during a period of acute geopolitical and transatlantic tensions, what underlies Sanchéz’s foreign policy? We explain.Parliamentary gridlockPedro Sanchez’s stance on matters abroad likely flows from the political compulsions he faces at home. At the root of this lies the compromise his party, Partido Socialista Obrero Español (PSOE) or the Spanish Socialist Workers’ Party, made in order to form the government in Spain’s 350-seat Lower House of parliament, called the Congress of Deputies. Needing a simple majority of 176 votes to pass major legislation, the social democratic PSOE is currently running a minority government: although in a formal coalition with the left-wing electoral platform Sumar, it requires outside support from regional parties belonging to the Catalonia and Basque regions with diverging political alignments.Also read | Caste: how a Spanish word, carried by the Portuguese, came to describe social order in IndiaWith this alliance’s ideological spectrum stretched both ways, Sanchéz — who has been PM since 2018 across three terms now — needs to simultaneously appease numerous factions. In addition, the conservative People’s Party (PP), which is the largest party by numbers in the Congress of Deputies (PSOE is the second-largest), controls the Upper House (called the Senate) as well. This poses a significant hurdle to smooth passage of legislation cleared by the Lower House.These domestic constraints could have compelled Sánchez to project power on the global stage instead.Global rebrandingThe leadership vacuum across the progressive Left on both sides of the Atlantic has arguably aided Sanchéz’s attempt to rebrand himself as a global statesman.Story continues below this adIn 2025, an acute affordability crisis almost resulted in Canada’s ruling Liberal Party losing power to the Conservative Party. Ahead of the federal election, the left-of-centre Liberals shifted towards the centre, replacing the then incumbent Prime Minister Justin Trudeau (who had a tense relationship with Trump) with the technocratic Mark Carney, who went on to win. Since becoming PM, Carney has had a cautious approach towards the Trump administration.Sanchéz appears to have perceived this fracture among the Canadian progressives as a warning signal. Faced with a similar right-wing populist threat in Spain, he has chosen to do the opposite: double down on his ideological defiance and energise his base. In doing so, he seems to be banking not just on general scepticism towards Trump but also the country’s collective distrust of militarisation — a legacy of the dictatorial regime led by Francisco Franco till the mid-1970s.Given the political ambivalence displayed by his European counterparts such as British PM Keir Starmer or French President Emmanuel Macron, Sanchéz seems intent on establishing himself as the front-runner of the “anti-Trump coalition”.Also read | Trump’s ultimatum and ‘escalate to de-escalate’ tactic will not work with IranAs part of his opposition to Trump’s actions such as imposing global tariffs, Sanchéz has attempted to project economic sovereignty even as other European nations scrambled to secure exemptions from the US. He denounced Trump’s tariffs and did not show any haste in dispatching trade envoys to Washington, DC. This has changed public perception of Spain’s role in the EU — a deviation from the traditional deference it has shown towards France or Germany in terms of dictating the bloc’s geopolitical strategy.Story continues below this adAlso, by recently opposing US demands to allow American strikes on Iran from the Rota and Morón military bases, Sánchez appears to have positioned Spain as the primary thought leader of the European progressive resistance to the war in West Asia.The 2027 re-electionFinally, Sanchéz’s approach to Washington is also aimed at furthering his position in next year’s Spanish general election. His strategy is two-pronged: absorbing the fragmented Spanish left while cornering the right on the US’s hostile stance towards Spain.Having already established himself as a figurehead of the anti-Trump coalition, Sanchéz has tried to counter the political threat from his own alliance partners by championing their causes. This is to ensure that the government does not face the prospect of internal collapse, despite persistent tensions over Spain’s ongoing domestic housing crises or probes into alleged corruption concerning the Sanchéz administration.But more importantly, Sanchéz appears to have the right-wing opposition — specifically the PP and the far-right Vox party — in a bind. With Sanchéz framing his current geopolitical approach as a step towards Spanish sovereignty, any active opposition by PP on this front would allow Sanchéz to paint them as aligned with an openly hostile US administration. Also, even though Vox is ideologically aligned with Trump’s populist right-wing brand, the party cannot easily justify supporting a US president threatening Spain with economic repercussions.Story continues below this adConsidering he is running a dispensation that is relatively more fragile than his previous two terms, Sanchéz’s global focus in the face of domestic instability appears to be a gamble aimed at political survival.