Barely a week goes by without Iran and Russia announcing some joint adventure in the sea, on land, or in space. Just last week, as Iran’s minister of communications and information technology, Mahmoud Vaezi, made his way to Moscow, he promised “a new phase in all aspects” of relations between the two countries. And on Monday, Russia announced that the deal to supply Iran with advanced surface-to-air S-300 missiles had “come into force.” These are all part of an unprecedented partnership between Iran and Russia, forged in the aftermath of the nuclear deal and cemented with cooperation on Syria. This new partnership is driven largely by internal political competition between Iran’s moderate pragmatists and its hard-line conservatives.

Iran’s pragmatists have long pressed their country to follow what they call the China model: liberalizing the economy and opening up diplomatically while keeping the political space constricted. The China model took root during the administration of former Iranian President Akbar Hashemi Rafsanjani, who initiated limited free-market-oriented economic reforms in the 1990s and also sought to reduce conflict with the United States. This line of thinking contributed to the nuclear negotiations and eventual deal by his protégé, President Hassan Rouhani.

The country’s hard-line conservatives, however, do not find the China model appealing. The supreme leader, the Iranian Revolutionary Guard Corps (IRGC), and the security apparatus fear that economic liberalization would undermine their vast financial and political interests. Additionally, they worry that any economic and political opening to the United States would lead to the collapse of the regime as Mikhail Gorbachev’s glasnost led to the end of the Soviet Union.

Russian President Vladimir Putin meets with Iran's President Hassan Rouhani in Ufa, Russia, July 9, 2015. Alexander Nemenov / Reuters

But it now seems that the country’s conservatives have come, instead, to favor what they view as President Vladimir Putin’s Russia model—that is, securitizing the state and the economy to prevent a U.S.-supported regime change. In this model, the regime introduces limited “privatization” and “liberalization” intended to largely benefit the regime’s loyalists, while maintaining a solid anti-American stance. As Iran’s Supreme Leader Ayatollah Ali Khamenei has declared, appeasement will only embolden the United States. His approach is clearly on display in Syria, where Iran is supporting President Bashar al-Assad. Khamenei has spoken out against any hint of U.S. influence in the era after the nuclear deal. Even the opening of an imitation KFC restaurant in Tehran last week was seen as too American, and it was promptly shut down.

In an ongoing showdown between pragmatists and conservatives, the conservatives seem to have strengthened their position. Popular support for the deal and desire for more engagement with the rest of the world had become a security concern to conservatives. In turn, just as negotiations over the nuclear deal were bearing fruit, hard-liners strove to contain the effects of the deal through a series of meticulously timed measures. Khamenei encouraged surprisingly open debate about the details of the deal, presumably to give other hard-liners an opportunity to point out its flaws. He recently established an absurd rubric for evaluating the deal in the future. For example, he has stated that the U.S. President must promise in a written note that the architecture of sanctions would be dismantled. He has stressed that Iran would consider any new sanctions at any level and under any pretext a violation of the deal. In effect, Khamenei wishes for a weak deal that he can eventually frame as a failure: one that removes enough financial and economic sanctions for Iran to function but which can still be portrayed as a disaster so as to undermine popular and elite support for the moderate President Hassan Rouhani.

At the same time, Khamenei was growing increasingly concerned that the fall of Assad would weaken the IRGC and provide another boost to the moderates. Khamenei thus turned to Russia for help. The Iranian Quds Force leader Qassem Suleimani reportedly went to Moscow last July to coordinate a new military operation with Putin. In Syria, Iran agreed to contribute its ideological might, deep intelligence, and Shia foot soldiers; Russia provided advanced military power. Although the pragmatists view Syria as an important ally, too, they seem to be less wedded to Assad. Just as the balance of power changed in Syria in Assad’s favor, so it did in Iran for Khamenei.

A military truck carrying a missile and a picture of Iran's Supreme Leader Ayatollah Ali Khamenei, September 22, 2015. Raheb Homavandi (TIMA) / Reuters

Putin had, of course, already worked with Iran. In 2013, Russia mediated a deal with Assad to dismantle his chemical arsenals. That critical move prevented U.S. military action against Damascus and silenced Iranian pragmatists’ calls for a compromise in Syria. That successful partnership provided the foundation for the ongoing collaboration between the two in Syria. As soon as the nuclear agreement was all but concluded, Khamenei and Putin made moves to jointly double down on their support of Assad.

To Khamenei, Putin is now a more reliable partner than ever before. Putin currently shares a similar fear of U.S.-instigated color revolutions. Although the two leaders may regard Syria’s strategic value differently, both understand its importance to their broader anti-American foreign policies and their internal survivals. In Russia, Putin’s anti-American policies have reportedly won him solid approval ratings, which his new adventure in Syria has only heightened. By contrast, Khamenei is struggling to maintain support with a population that, in the 2013 election, voted overwhelmingly for Rouhani, who ran on a platform of cooperation rather than confrontation with the United States.

Unless deftly managed, Iran’s parliamentary and Assembly of Experts elections in February could make matters worse for both Khamenei and the IRGC. The expanding partnership with Russia could strengthen the IRGC’s regional power, which often translates into more internal leverage. But on the other hand, the relationship with Moscow could backfire. Iran seems less certain than ever that the United States is indeed the Great Satan, and it may be poised to reward Rouhani yet again in the upcoming elections for brokering the nuclear agreement. Furthermore, Tehran and Moscow do diverge on specific objectives, such as the extent of involvement in Syria, and there has been historical mutual distrust between the two. Both moderate and conservative Iranians believe that Russia has a long history of using Iran as a bargaining chip in dealing with the United States. Russia could limit its collaboration with Iran just as it prolonged the completion of the Bushehr nuclear power plant and cancelled the delivery of the S-300 missiles while it brokered deals with Washington. These betrayals would often empower moderate Iranians, who argue against working with “little Satans” and instead advocate negotiating directly with the Great Satan.

Members of Iran's Revolutionary Guard attend Friday prayers in at the University of Tehran mosque, July 16, 2010. Morteza Nikoubazl / Reuters

However, if Putin’s partnership in Damascus can help Khamenei maintain the current balance of power in Tehran for the short term, Iran’s hard-liners may have enough time to engineer the return of anti-Americanism. Just as the Russian population was disenchanted with the West after the collapse of the Soviet Union, it is possible that the Iranian population, particularly its youth, will quickly feel betrayed by the United States in the post-nuclear-deal era. Or so Khamenei hopes. As the U.S. Congress prepares the next generation of antagonistic bills, such as the Justice for Victims of Iranian Terrorism Act, and the administration of U.S. President Barack Obama continues to arm Tehran’s regional rivals, namely Saudi Arabia, both Iranian moderate elites and the population at large could eventually grow disenchanted with the United States.

The clash between the China and Russia models in Iran is far from settled. In fact, it is only intensifying in the aftermath of the nuclear deal. Iran’s hard-liners are pushing back through their operation in Syria and an internal crackdown on pro-U.S.-engagement groups, whom they label as “infiltrators.” The pragmatists rely on their popular and elite support, as well as the recent nuclear “victory,” to keep the conservatives at bay. Although the United States should stay out of Iran’s factional politics, it should be aware that U.S. policies could have unintended consequences for the internal balance of power in Iran. Unless Iran is defeated in Syria, Washington’s confrontation with Tehran could empower the proponents of the Russia model. On the other hand, U.S. engagement could make the conservatives panic and behave more aggressively against those who advocate for the China model.