Iranian President Hassan Rouhani leaves the podium after speaking during the 71st session of the United Nations General Assembly at U.N. headquarters in New York on Sept. 22, 2016. (Seth Wenig/AP)

A year ago, Iran seemed on the verge of a new relationship with the United States and the world.

In his address to the United Nations last fall, President Hassan Rouhani said the nuclear deal just signed, lifting sanctions and setting limits on Iran’s nuclear program, was a foundation for change.

“We were not solely seeking a nuclear deal,” he said. “We want to suggest a new and constructive way to re-create the international order.”

Flash forward a year, and Rouhani’s optimism has been replaced by disappointment and finger-pointing.

In his U.N. speech and a wide-ranging news conference this week, Rouhani bitterly accused the United States of failing to live up to its obligations under the nuclear deal. In the eight months since the deal was implemented, he said, Washington had delayed licenses for business transactions and blocked Iran’s access to banks.

“The lack of compliance . . . on the part of the United States in the past several months represents a flawed approach that should be rectified forthwith,” he said Thursday.

He also kept up the war of words with regional rival Saudi Arabia, accusing it of spreading hatred and trampling on the rights of neighboring countries. And he steadfastly maintained support for the Syrian government of Bashar al-Assad, which has dropped barrel bombs and chlorine gas on its own people. Iran’s support for Syria was not based on one man, Rouhani said.

Some of the difference in tone can be chalked up to Rouhani’s facing reelection in six months. He is in campaign mode, and his reproachful public stance reflects the letdown felt by many Iranians who believe the economic benefits from the lifting of nuclear-related sanctions have been meager so far.

“He’s under attack in Iran for a variety of things,” said Gary Sick, a Columbia University scholar who served on the National Security Council under three U.S presidents. “The principal one is that he sold out Iran’s interests, that he gave away too much, that he’s too cozy with the Americans. The idea of spending a lot of time here did not play well at home. He had to protect his flank.

It was always clear that any rapprochement between Washington and Tehran would come slowly. Last year, a handshake between President Obama and Iran’s foreign minister during a chance encounter at the United Nations made news in Iran, where officials described it as “accidental” to appease unhappy hard-liners.

So there was little chance that Rouhani and Obama would encounter each other this year during Rouhani’s 48-hour stay.

“He can’t seem too solicitous toward the United States,” said Barbara Slavin, acting director of the Future of Iran Initiative at the Atlantic Council. “He has to see the glass half-empty, so as not to look like he’s soft on Washington.”

Slavin said it would have taken guts for Rouhani to meet Obama and shake hands, given Iran’s ­domestic politics.

“Probably he is the right man at the right time, and the best we can hope for,” she said. “But he’s a cautious bureaucrat. He knows exactly how far he can go without riling up the supreme leader and other hard-line elements of the country. And maybe this sort of cautious policy will lead to improved U.S. relations. But not anytime soon.”

In the United States, Iran and Rouhani remain highly unpopular.

While Rouhani was in New York, Rep. Edward R. Royce (R-Calif.), the chairman of the House Foreign Affairs Committee, introduced a bill named the “Prohibiting Future Ransom Payments to Iran Act.” It was a response to the revelation that the United States paid $1.3 billion in cash to Iran as part of a settlement from a fund that was Iran’s money but that Washington had held on to since the 1979 Islamic revolution.

Iranian Americans staged a large demonstration outside the United Nations during Rouhani’s speech, protesting the holding of political prisoners in Iran. Relatives of some dual nationals convicted on espionage charges they consider political, not substantive, tried to deliver letters to Rouhani pleading for his intervention.

Security was tight when Rouhani held a private, off-the-record meeting Wednesday night with scholars and opinion-makers, and during a news conference Thursday. Journalists had to show invitations to the news conference a block away from the hotel site and were given security codes to gain entry.

Rouhani spent more than an hour fielding questions, largely repeating what he had already said in every venue. He defended the nuclear deal as a “victory,” allowing Iran to continue enriching limited levels of uranium for peaceful purposes such as generating energy. He boasted that economic growth was approaching 5 percent this year. He said he was watching the U.S. presidential campaign with interest, but ultimately, he sounded pessimistic about the possible results.

“Over 38 years, almost four decades, we have seen many different presidents,” he said. “Some were a bit better than others.”

But, he added, pointedly using the plural tense, “The people of Iran have not been happy with the comportment and actions of U.S. governments.”