In recent months, a host of developments have fueled significant tension between the United Kingdom and Iran. The UK Parliament’s decision to classify Lebanese militant group Hezbollah “in its entirety” as a terrorist organization earlier this year, London siding with the Trump administration against Iran in the June 20 drone incident, and the tanker detainment episodes in Gibraltar and the Strait of Hormuz this month have driven this downward trajectory in UK-Iran relations. Put simply, London may be moving in the direction of doing the White House’s bidding in relation to Iran.

The world is waiting to see how the British government deals with Iran’s capture of the British-flagged tanker Stena Impero. With Boris Johnson the UK’s new prime minister, there are many unknown variables in the equation. Johnson has frequently expressed his determination to avoid an escalation with Iran, yet he rhetorically favors Trump and America over mainland Europe. Thus, it is difficult to predict how the UK’s new prime minister will lead London’s foreign policy in the Middle East and beyond, which has already been quite a sensitive balancing act between honoring the ‘special relationship’ and standing firmly with European partners to uphold the Joint Comprehensive Plan of Action (JCPOA).

Scores of analysts in addition to the Spanish foreign minister believe that Britain’s decision to send thirty Royal Marines to take over Iran’s oil tanker, Grace 1, off Gibraltar on July 4 was simply about responding to a request from Washington. Although London has fully defended that action on legal grounds, maintaining that the UK was merely enforcing EU sanctions on Syria—that are unrelated to the Trump administration’s Iran policy—it would have been naïve for British officials to have not expected some form of retaliation from their increasingly cornered counterparts in Tehran who see London as complicit in Washington’s economic warfare against the Islamic Republic.

As Independent columnist Patrick Cockburn wrote, “One fact about Iranian foreign policy should have been hardwired into the brain of every politician and diplomat in Britain, as it already is in the Middle East, which is that what you do to the Iranians they will do to you at a time and place of their own choosing.”

Of course, London’s increasingly hawkish position against Iran has to be understood within the context of the never-ending Brexit saga. With the UK plans to leave the European Union, some in Britain see their country as having no choice but to curry greater favor with the US and double down on the ‘special relationship’ with Washington. However, as the memory for many Brits is still fresh of how the UK stumbled into the wars in Afghanistan and Iraq as America’s junior partner, there are legitimate concerns in the UK about the trouble the country could enter in relation to Tehran—all while London appears to lack a coherent strategy towards dealing with Tehran as well as adequate military capacity to project power East of the Suez Canal.

With the US administration determined to delegitimize the JCPOA and inflict economic suffering on Iran with the hopes that ensuing instability and anger among Iranian citizens will lead to the Islamic Republic regime’s collapse from within, such an agenda does not align with London’s intentions regarding the JCPOA and Tehran. After all, London’s former chief diplomat Jack Straw described Trump’s national security adviser as “off the wall,” a view that likely reflects the British diplomatic establishment’s view of John Bolton.

Ideally, the UK and Iran will enter negotiations over their tankers and find room for reaching a compromise. Yet Johnson will need to also reach a common understanding with the White House about the US administration’s strategy on Iran, which also appears rather vague. Further, the British leadership must also determine its ultimate objectives and find ways to leverage the UK-US alliance to London’s own advantage without the British government being pushed into a new Middle East quagmire because of pressure from the White House.

Ultimately, the UK’s leadership needs to decide whether they support efforts to salvage the JCPOA and to what extent this can be practically done in a way to bypass US sanctions. While there are no indications that London wants to abandon the JCPOA, the UK has also done little in coordination with France and Germany to provide Tehran with a viable lifeline that would make it attractive for the Iranians to remain committed to the deal. The INSTEX ( Instrument in Support of Trade Exchanges) mechanism that Europe has envisaged to create to bypass US sanctions, has so far not proven to create any incentive for European corporations to trade with Iran, risking losing business in the United States.

Nonetheless, any moves that London makes concerning Tehran which Iran’s leadership sees as an outcome of the UK being dragged into Trump’s “maximum pressure” campaign against the Islamic Republic will further dim any prospects for de-escalating the tension between the UK and Iran. Officials in London will have to consider this factor when weighing options for responding to Iran’s capture of the Stena Impero in defiance of a British warship. According to The Telegraph, M15 and M16 officials have warned that Hezbollah-linked terror cells exist in the UK and could be activated to carry out attacks in retaliation to any escalation of tensions. Iran’s government carrying out cyber-attacks against the UK must also be considered.

Bogged down domestically with Brexit and a sensitive transition to a new prime minister, the UK finds itself in a difficult position. There are no easy options for dealing with this international episode that tests London’s credibility as a former superpower that seeks to redefine itself globally in the post-Brexit era. Trapped between EU members and the White House, London seeks to set its own redlines to protect the UK’s shipping interests in the Persian Gulf while remaining supportive of Paris and Berlin’s positions in favor of the JCPOA without isolating the US administration.

This balance will be difficult to strike. However, it is clear that London is determined to avoid letting this situation spiral out of control. The UK’s leadership has stressed that it is pursuing a diplomatic—not military—solution to this episode, and London reportedly urged the White House to avoid sabre rattling in response to the Stena Impero’s capture. What remains to be seen is how Britain can continue a tightrope walk between a US and European policy on Iran amid Tehran’s apparent attempt to torpedo it.

Giorgio Cafiero is the CEO of Gulf State Analytics, a Washington, DC-based geopolitical risk consultancy. Follow him on Twitter: @GiorgioCafiero.

Andreas Krieg is an assistant professor at the Defense Studies Department of King’s College London and a strategic risk consultant working for governmental and commercial clients in the Middle East. Follow him on Twitter: @Andreas_Krieg.