Tuesday’s long-awaited nuclear deal between Iran and six world powers was celebrated from Washington, D.C., to Tehran. Elsewhere in the Middle East reactions were mixed, but a clear winner emerged in Syrian President Bashar Assad, who heralded the agreement “a great victory.” In a message to Iranian Supreme Leader Ayatollah Ali Khamenei, Assad said the deal would be a “major turning point in the history of Iran, the region and the world.”

Assad is banking on the deal strengthening and legitimizing Tehran’s support to Damascus. The U.N.’s special envoy for Syria, Steffan de Mistura, estimates that Iran spends between $6 billion and $35 billion per year propping up its ally -- a number that looks set to increase as Iranian sanctions are lifted.

Not everyone is celebrating the changing world order. The U.S. has found an unlikely ally in Iran but this partnership threatens what little credibility America had with Syrian rebels, and is likely to alienate its regional allies.

In the early years of Syria's civil war, allegiances were clear cut: Gulf States and the U.S. backed the opposition and Iran and Hezbollah supported the regime. But as the war tears into its fifth year, allies and enemies have become nearly indistinguishable in Syria.

The U.S. has slowly moved away from its stance that Assad must step down -- and that outside actors backing the regime are doing so “nefariously”-- and is now focused on defeating the Islamic State group, which is also known as ISIS or ISIL.

“I think we have to come to an understanding that they key priority would be combatting ISIS,” said Suzanne DiMaggio, a senior fellow and director of the Iran Initiative at New America. “The Iranians and the Americans are getting to be more of the same mind on how to approach this.”

Discussing the deal in a live news conference on Wednesday, President Barack Obama emphasized the importance of including Iran in a solution to the Syrian civil war. This is a drastic change from last year, when U.S. Secretary of State John Kerry publicly opposed Iran’s inclusion in a United Nations conference on Syria. At that time it was Assad who insisted: “Iran needs to be part of the solution,” he told Agence France-Presse.

That solution was an Iranian proposal for Syria that would require all interested parties to “give priority to fighting terrorism in Syria.” After a humanitarian ceasefire was in place, the Assad regime and Syrian opposition would form an interim government. The idea is that once the country is stabilized, Assad would step down, giving way to “presidential and parliamentary elections.”

But the Syrian opposition is unwilling to agree to a peace deal on Iranian terms. “We think that Iran is our enemy,” said Abdurahman Saleh, head of the Jaish al-Islam rebel brigade’s media office, told International Business Times via Skype. “It controls the Assad regime and occupies Syria, so an agreement between our enemy and the U.S. will not be for our interest.”

Syrian rebels in Idlib Rebel fighters carry Ahrar Al-Sham (left), Free Syrian Army (center) and Nusra Front (right) flags in Idlib city in northern Syria, after they took control of the area March 29, 2015. Photo: Reuters/Ammar Abdallah

For many rebels, enlisting Iran’s help in the anti-ISIS strategy is anathema. “The Iranian nuclear deal means that Assad will stay in power,” said Mohammed Hassan al-Homsi, a Syrian rebel fighter in Idlib whose name has been changed for security reasons, told IBTimes. “I know what's going on here. Obama just signed the world into big trouble. The coming days will reveal it.”

Al-Homsi, like many other Syrian opposition fighters, believes that the U.S., Iran and the Syrian regime had been tacitly working together for months toward the common goal of defeating “terrorists.” The nuclear deal, he said, is just a way to make those alliances public and put Iran’s proposal on the negotiating table.

Rumors that the U.S. indirectly threw the Syrian regime a lifeline started last year, when the White House announced it was going to intervene. Many Syrians had been waiting for this day since the war began, but the American-led coalition focused on ISIS targets, ignoring Assad.

Two years ago, Syrian rebels and pro-opposition civilians were calling for U.S. bombs and Western intervention against Assad following the killing of thousands in a chemical weapons attack. But the bombs never came.

“We remember when the regime got rid of its chemical weapons, it was given free rein in Syria to kill with all other weapons,” Saleh said. “Now Iran can do whatever it wants [in Syria] so long as it will not make a nuclear bomb.”