The agreement, finally implemented Saturday in Vienna, consumed Rouhani's first two-and-a-half years in office but it will lift sanctions that had crippled Iran's economy.
Having ended the 12-year international crisis over Iran's nuclear programme, Rouhani wants to bolster his position at home, where Iranians want to see concrete economic improvements.
If candidates aligned with the moderate president make gains in parliamentary elections on February 26 they could shift the balance of power away from conservatives, allowing him to enact some social and political reforms.
In Rouhani's favour is a high approval rating -- more than 60 percent, analysts say -- but his fate remains tied to the nuclear deal.
A win for a Republican in November's US presidential election could see the agreement fall apart.
"If sanctions are removed with no problems, Rouhani will benefit as he will be seen as a good politician who kept his promise," Foad Izadi, a politics professor at Tehran University, told AFP.
"But if what is happening in Congress continues, and the deal unravels without positive results, Iranians will reconsider what Rouhani did. They will be able to ask him: what happened?'"
Only in the United States have politicians spoken of ripping up the agreement. The other five powers involved -- Britain, China, France, Russia and Germany -- remain squarely behind it.
- Republican in the White House? -
The Republican-majority House of Representatives has proposed a bill that would bar President Barack Obama from lifting some sanctions.
Although Obama can veto the measure, it shows the potential pitfalls for the nuclear deal -- no Republican candidate running for president has pledged to keep it.
Rouhani, facing a re-election race in June 2017, remains exposed to such a shock.
"Many Republicans were against the Iran talks from the beginning," Izadi said. "If they get their way Rouhani may not get a second term as president."
Such a result would be a first since the Islamic republic's formation in 1979.
Rouhani is its seventh president. The first one fled and the second was assassinated, but the four who preceded him each served two consecutive four-year terms.
Signup to our newsletter and follow us on Facebook and Twitter!
Amir Mohebbian, a moderate conservative political analyst and strategist close to Foreign Minister Mohammad Javad Zarif, said Rouhani's government remains vulnerable to public opinion.
The biggest potential weakness is that Iran's president has offered hope of better times yet the economy is flat.
Rouhani has managed to cut inflation to 13 percent from above 40 percent under his hardline predecessor Mahmoud Ahmadinejad, but growth remains weak.
Iran's currency, the rial, has lost ground against the dollar since the nuclear deal was struck on July 14 last year. And income from oil sales has plummeted because of the falling price of crude.
"Ordinary people's short term memories are awake. They still see the situation as worse than before. They need to see a positive," Mohebbian said.
- Managing people's perceptions -
And if Rouhani cannot exploit the nuclear deal's benefits his opponents may be able to use it against him.
"If I was him I would let the population know that after the nuclear agreement the economic situation will be better," Mohebbian said.
"If people are disappointed now it shows Rouhani does not look at this closely enough. Without good perception management maybe he will be the first president in Iran to serve one term only."
Iran's supreme leader, Ayatollah Ali Khamenei, had the final word on the nuclear agreement, backing Rouhani because he wanted sanctions to end.
But Khamenei said in October that any new sanctions -- even Obama's White House has threatened penalties over Iran's ballistic missile programme last month -- could constitute a breach.
Ellie Geranmayeh, an Iran specialist at the European Council on Foreign Relations, said getting the deal implemented is "perhaps a bigger victory" for Iran's president than the original agreement.
"It was important for Rouhani that sanctions be lifted before the elections, even if the tangible impact in the next month is nominal," she said, agreeing that the vote's outcome remains unpredictable.
But Rouhani and his allies can push the nuclear deal as a solid victory, which also saw seven Iranians jailed in America exchanged for four dual citizens held in Tehran in an apparent goodwill gesture.
"He has proved both domestically and to the West that he can deliver," Geranmayeh said, allowing him "to contrast his pragmatic diplomacy" against Ahmadinejad's antagonism.
"He will ask the people who served Iran's national interests better?" Geranmayeh added of Rouhani.