The U.S. military strike on Iranian-backed fighters in Syria this week represents a crucial first test of the Biden administration’s attempt to balance competing goals on Iran, a strategy experts say is unlikely to end a lethal history of militia violence against U.S. personnel.

Analysts described the attack on a site near Syria’s southeast border with Iraq as a calibrated response to rocket fire on U.S. facilities in neighboring Iraq but said it would probably have little practical impact, in part because it avoided more sensitive areas controlled by Iranian-backed militias.

More importantly, leaders in Tehran have taken measure of President Biden’s pledge to use renewed diplomacy to resurrect the 2015 Iran nuclear deal and his desire to curtail America’s decades-long military activities in the Middle East, both of which suggest a less bellicose approach than embraced by President Donald Trump.

“To Iran, the Biden administration’s clear interest in re-exploring a nuclear accord is tantamount to an invitation to utilize proxies as a means to buy leverage and time,” said Charles Lister, a senior fellow at the Middle East Institute. “If there’s anything Iran is good at, it’s probing the enemy and testing its red lines — all while seeking to gain leverage in doing so.”

U.S. officials assessed that the strike, in which two F-15E Strike Eagle jets dropped seven precision bombs, killed a handful of fighters affiliated with two Iranian-backed militias. The officials said the groups are linked to a Feb. 15 rocket attack on a U.S. base in northern Iraq that killed a contractor working with the U.S. military and injured an American service member.

Asked Friday by reporters what message he intended for Iran in authorizing the operation, Biden said: “You can’t act with impunity. Be careful.”

Officials have also blamed Iranian proxies for other rocket attacks on U.S. sites in Iraq since Biden took office. Once a daily occurrence during the war that followed the 2003 invasion of Iraq, what are known as indirect fire attacks — rockets or mortars usually launched from fixed sites or the backs of trucks — have been sporadic in recent years, often causing no harm.

That was not the case in December 2019, when a barrage of missiles struck a U.S. base, killing an American contractor. That event triggered a string of events culminating in the Trump administration’s decision to authorize a drone strike killing Qasem Soleimani, a revered Iranian general, and a retaliatory missile attack launched from Iran on U.S. forces in Iraq.

Pentagon spokesman John Kirby said the operation, which occurred early Friday in Syria (late Thursday in Washington), targeted a compound containing housing and other militia resources.

“We’re confident that these were legitimate targets that were utilized by groups associated with these recent attacks — structures, housing, capabilities that they utilized to help perpetrate attacks on our troops and on our coalition partners in Iraq,” he told reporters Friday.

Kataib Hezbollah, one of the militias the Pentagon targeted, denied any role in the Feb. 15 rocket attack in the Iraqi city of Irbil. In a statement, the group said one person had died in Friday’s strike.

The administration’s decision to strike a militia site in Syria, rather than Iraq, reflects its intent to minimize friction with Baghdad, which vigorously criticized unilateral U.S. attacks on militia targets during the Trump administration.

Even so, Iraq’s government signaled its discomfort with the attack. In a statement, the Iraqi Defense Ministry pushed back against what appeared to be a suggestion from Defense Secretary Lloyd Austin that Iraq shared intelligence with the U.S. government before the strike.

“Our cooperation with the international coalition forces is limited to a specific goal . . . to fight Daesh and its threat to Iraq, in a way that preserves the sovereignty of Iraq,” the statement said, using an Arabic term for the Islamic State.

Looming over the aftermath of Friday’s operation — the Biden administration’s first military action aimed at Iranian-backed groups — is the challenge the White House faces in its effort to balance competing goals on Iran.

Biden advisers, some of whom helped negotiate the 2015 nuclear deal, hope to restore the agreement, which Trump pulled out of in 2018. After withdrawing, Trump authorized punishing sanctions on Iran, which has since begun enriching uranium at higher levels.

The officials regard Iran’s support for powerful proxy groups — from Iraq to Lebanon to Yemen — as a major destabilizing element in the Middle East. They may try to incorporate Iran’s proxy activities, and its formidable ballistic missile program, into the deal, a move analysts say Iran is likely to resist, as it has in the past.

Norman Roule, who served as the U.S. national intelligence manger for Iran until 2017, said Tehran’s decisions regarding proxy actions may have been influenced by comments from current administration leaders about Biden’s desire to reduce the U.S. presence in the Middle East.

“The administration’s actions and Europe’s support for U.S. decisions in response to Iran’s regional tests will determine whether Tehran believes it can be more aggressive regionally under Biden,” he said. “But if the Iranians go up the escalatory ladder, we have no choice but to do the same in order to protect our forces and our partners.”

How the operation affects prospects for reviving the nuclear deal was not immediately clear. Speaking Friday, White House press secretary Jen Psaki said the United States remains “open to having these diplomatic conversations.”

Biden administration officials have said they would be willing to attend talks, proposed by the European Union, related to Iran’s nuclear program. As both countries prod the other to take the first step, Tehran has not yet said whether it would take part.

While several lawmakers criticized the administration Friday for failing to provide adequate notification ahead of time, Psaki said congressional leaders were informed before the strike. Other lawmakers were being briefed Friday, she said.

Salim reported from Baghdad. Sarah Dadouch in Beirut, Robyn Dixon in Moscow, and Karoun Demirjian, Anne Gearan, John Hudson, Olivier Knox and Ellen Nakashima in Washington contributed to this report.