ISTANBUL — Iranian President Hassan Rouhani said Thursday that he has "no doubt" that the incoming U.S. administration will rejoin the 2015 nuclear deal and remove sanctions on Iran's economy.

His remarks came a day after Supreme Leader Ali Khamenei also appeared to endorse the swift resumption of Iran’s commitments under the deal if it would herald the end of harsh U.S. sanctions.

“I have no doubt that the heroic national resistance of Iran is going to compel the future U.S. government to bow . . . and the sanctions will be broken,” Rouhani said Thursday at the inauguration of several infrastructure projects, where he spoke via videoconference.

On Wednesday, Khamenei had said in a televised address that if U.S. sanctions “can be lifted in a correct, wise, Iranian-Islamic [and] dignified manner, this should be done.”

“We should not hesitate for even an hour,” he said, echoing a phrase Rouhani often uses.

The comments marked a rare public display of unity between the two leaders, who have often sparred over the wisdom of negotiating with the West. It also signaled to President-elect Joe Biden that Iran’s leadership is willing to preserve the deal, which curbed Iran’s atomic energy activities in exchange for sanctions relief, as long as the trade embargo is lifted.

President Trump ended U.S. participation in the agreement in 2018 and reimposed sanctions in various areas, such as Iran’s oil sales, financial transactions and construction imports. The administration said it wanted Iran to renegotiate the deal and give up its missile program and support for militias in the region.

But obstacles to renewed diplomacy remain for both sides. Even as Iranian leaders urged the United States to return to the agreement, Iran’s parliament and the influential Guardian Council approved legislation this month that would ramp up the country’s nuclear activities within a narrow time frame. Iran will also vote for a new president in June, an election that could usher in a more hard-line executive.

Khamenei’s remarks this week were the “first clear signal that he would be open to returning to the nuclear accord before the June presidential elections, provided the U.S. does the same,” said Henry Rome, senior analyst at the political risk firm Eurasia Group.

But the comments, Rome said, also “came in the midst of a swirl of contradictory messages.”

“The supreme leader will need to make additional public comments to indicate a new, defined policy position,” he said. “Khamenei tries to balance competing domestic factions, while maintaining maximum flexibility for himself to change his mind in the future.”