Smoke rises from an alleged Saudi airstrike on Houthi positions in Sanaa, Yemen. (Yahya Arhab/European Pressphoto Agency)

Even as their highest-ranking diplomats were shaking hands this week on a landmark nuclear accord, the United States and Iran continued moving weapons, money and fighters across the Middle East in an uninterrupted shadow war.

At secret CIA bases in Jordan, U.S. operatives continued to arm and train fighters being sent into Syria to oust a critical ally of Iran.

In Saudi Arabia, U.S. military advisers remained in place at a command center selecting targets for airstrikes in Yemen against Shiite rebels allied with Tehran.

At the same time, Iran offered no indication that it intends to suspend its support to Hezbollah, militia groups in Iraq or troops loyal to Syrian leader Bashar al-Assad.

The agreement to curtail Iran’s nuclear program was hailed by President Obama and other world leaders as a step toward stability in the Middle East. But there are already competing theories about whether the deal will help to defuse other disputes, or lead hard-liners to dig in and use the expected jolt to Iran’s economy to escalate long-running proxy wars.

Iran has finally reached a nuclear deal with the U.S. and international partners. Here's what's in the deal, and what happens next. (Gillian Brockell and Julio C. Negron/The Washington Post)

U.S. officials have sought to reassure allies in the Middle East who fear that the lifting of sanctions on Iran will lead to an economic surge that would enable Tehran to ramp up its support to militant groups.

In a news conference Wednesday, Obama expressed hope that the deal might result in conversations on other subjects with an Iran that is “less aggressive, less hostile, more cooperative.” But he also voiced significant doubt.

“Will we try to encourage them to take a more constructive path? Of course,” Obama said. “But we’re not betting on it.”

Republicans have criticized the agreement as likely to embolden Iran in its competition with Israel, Saudi Arabia and other U.S. allies. Even within the administration, there are widely divergent views on how the deal might affect stability in the Middle East.

Obama, for whom the agreement represents a signature foreign policy accomplishment, has made the case that reopening Iran’s shattered economy will strengthen moderates in the country and push hard-liners to back away from militant activities that prompted broad, international penalties.

Vali Nasr, a former State Department official who serves as dean of Johns Hopkins University’s School of Advanced International Studies, urged the Obama administration to use the nuclear deal to foster more open dealings with Iran over issues such as the Islamic State, the militant group that now controls much of Iraq and Syria.

“We’re not in the Arab world of pre-2011 where you have all these stable regimes that are our friends, and even those that are not our friends have control of their territory,” Nasr said. “We’re now in an era in the Middle East that is orders of magnitude more complicated. We have to take stock of the reality, rather than only focus on what Iran is doing.”

What's next for Iran after the nuclear deal

Others, however, fear the agreement might prompt hard-liners in Iran who are worried about a loss of standing to reassert themselves by intensifying support to Shiite militias in Iraq or even endorse attacks on the expanding U.S. presence there. The United States has about 3,500 troops in Iraq as the White House broadens its campaign against the Islamic State.

The most religiously conservative elements in Iran have historically held sway over the Quds Force, the foreign military wing of the Iranian Revolutionary Guard Corps, and are most likely to oppose the nuclear deal.

Speaking to lawmakers last week, Obama’s top military aide, Gen. Martin Dempsey, cited an array of “malign activities” that Iran may continue. Among them are weapons trafficking, cyberattacks and the use of marine mines. Iran also continues to hold a number of Americans on espionage and other charges, among them Washington Post correspondent Jason Rezaian. Obama said Wednesday that “our diplomats and our teams are working diligently to try to get them out,” but argued that the negotiations could not be linked to their release.

The United States has engaged in its own cyber-sabotage campaign to derail Iran’s nuclear program. It is unclear whether such efforts will now be suspended because of the agreement, but many expect U.S. espionage efforts against Iran to intensify to monitor compliance with the accord.

Iranian officials have chided Israeli Prime Minister Benjamin Netanyahu for his fervent opposition to the nuclear deal, which many in Iran greeted as a tentative but potentially significant turning point in the country’s long-standing and costly conflict with the West.

But the agreement also prompted more cynical praise from Iran’s regional allies.

In Syria, Assad struck an emphatically expectant note. “We are confident that the Islamic Republic of Iran will support, with greater drive, just causes of nations and work for peace and stability in the region and the world,” he said.

Thousands of Iran-backed Hezbollah militants are fighting alongside Syrian forces, and Assad recently ratified a $1 billion line of credit from Tehran.

In Iraq, Tehran’s influence appears to be at an all-time high as Iranian-equipped Shiite militia groups have helped reverse gains made by the Sunni-dominated Islamic State.

Iranian-backed militias killed at least 500 American troops in the Iraq war. But in a measure of how political turbulence has scrambled traditional alignments, the United States and Iran are now wary allies in the campaign against the Islamic State.

Forces from Iranian-backed militias have massed around the Iraqi city of Fallujah, U.S. officials say, complementing the offensive launched this week by American-supported Iraqi troops around the nearby city of Ramadi.

Defending the deal, American officials have pointed to plans to extend a U.N. embargo on arms sales to Iran. The United States also has worked to interdict weapon shipments to proxy groups and will retain unilateral sanctions on individuals supported by Iran.

At the same time, U.S. officials are working to bolster joint security measures for Persian Gulf nations, whose leaders Obama gathered at Camp David in May. But enacting such measures has been slow.

Obama played down the potential for Iran to ramp up its proxy campaigns in the wake of the nuclear accord. With sanctions removed, “I think that is a likelihood that they’ve got some additional resources,” he said. “Do I think it’s a game-changer for them? No.”