Tensions between the Iranian president, Hassan Rouhani, and more conservative authorities over the country’s nuclear agreement and its future are turning increasingly bitter, punctuated by public exchanges and growing signs of an anti-American backlash, including arrests.

Mr. Rouhani is insisting that the nuclear deal signed in July not only will create the basis for an end to Iran’s prolonged economic isolation, but could be the start of new relations with the United States under certain conditions. Yet even his cautious statement of optimism has provoked a stormy reaction.

The tensions, which political analysts foresee lasting into next year at least, are in some ways an expected outcome of the nuclear agreement, which rolls back Iran’s atomic program in exchange for a broad lifting of sanctions. Many hard-liners opposed the accord as a submission to foreign powers, especially the United States. With the supreme leader, Ayatollah Ali Khamenei, endorsing the agreement, they turned their criticism directly on Mr. Rouhani and his aides.

The losing side’s reaction has been harsh, as seen in a series of arrests of Iranian journalists and at least one Iranian-American accused of collaborating with Western powers or worse. Even some prominent conservatives who mistrust the United States but see practical benefits in having a better relationship with it have been criticized.