Prospects for a historic nuclear deal with Iran appeared uncertain Thursday as Iranian diplomats insisted that Western governments formally recognize the country’s right to enrich uranium.

Negotiators who emerged from a second day of marathon talks spoke of “difficult” discussions on the details of a proposal that would restrict or scale back key parts of Iran’s nuclear program. But both sides said they were determined to continue bargaining.

A European Union official said negotiators had “narrowed a lot of differences,” but the official added that significant disagreements remained as the sides sought to overcome a trust deficit that has defined relations between Iran and the West for more than three decades.

“You cannot suddenly get an agreement overnight . . . so I do not think that anyone should panic,” Michael Mann, spokesman for E.U. foreign policy chief Catherine Ashton, said in an interview with Iran’s Press TV. “We are prepared to do hard work to bridge those differences. It will take as long as it takes.”

Mann’s assessment came on a day of shifting moods, as Iranian diplomats alternately expressed wariness and optimism about the chances for a deal with six major world powers. The sides reportedly came close to an agreement during a round of talks two weeks ago but fell short partly because of a lack of consensus among Western governments on the terms of the proposed agreement.

In a morning news conference, Iranian Deputy Foreign Minister Abbas Araqchi said Western negotiating tactics had eroded confidence in the talks. “In order for us to win the trust, we need to see a single common stance by all six countries,” he said. “The last time, we did not have such a thing.”

Araqchi and other Iranian officials publicly staked out a tough bargaining stance on one of the thorniest issues facing the negotiators: Iran’s demand for a formal recognition of its “right” to uranium enrichment in any nuclear deal. The Non-Proliferation Treaty, which Iran has signed, allows countries to pursue peaceful nuclear energy but does not explicitly convey a right to produce enriched uranium, the fuel used in nuclear power plants. With additional processing, the same material can be converted to highly enriched uranium for atomic bombs.

“Any agreement that does not include Iran’s enrichment right is not acceptable,” Araqchi said. “It must be mentioned in the text of the agreement, and it has to be respected.”

Western negotiators have refused to accede to a formal acknowledgment, while saying that a nuclear deal might allow Iran some limited capability to continue low enrichment with strenuous safeguards.

France’s chief diplomat, Foreign Minister Laurent Fabius, told France 2 television that any deal with Iran could “only be possible based on firmness.”

“For now, the Iranians have not been able to accept the position of the six,” Fabius said. “I hope they will accept it.”

Despite the verbal jousting, an E.U. spokesman described Thursday’s meetings as “substantial and detailed.” Iranian Foreign Minister Mohammad Javad Zarif held private sessions with Ashton and with several other delegations, including representatives from Russia, China, Britain and Germany. The Iranian side met briefly with U.S. diplomats in a bilateral session Wednesday night.

Both the U.S. and Iranian delegations face pressure from skeptics at home. On Thursday, Senate Majority Leader Harry M. Reid (D-Nev.) joined other prominent members of Congress in warning that even harsher economic sanctions could be imposed on Iran in the weeks ahead. The White House had lobbied to prevent lawmakers from approving new measures while the Iran talks were at a delicate stage.

“While I support the administration’s diplomatic efforts, I believe we need to leave our legislative options open to act on a new, bipartisan sanctions bill in December shortly after we return,” Reid said in a speech on the Senate floor.

In Iran, conservative clerics have warned newly elected President Hassan Rouhani against agreeing to any limits on Iran’s nuclear program. On Wednesday, hundreds of demonstrators formed a ring around the country’s Fordow uranium-enrichment plant to protest any deal limiting the facility’s output.

Iran’s supreme leader, Ayatollah Ali Khamenei, soured the atmosphere surrounding the talks with an inflammatory speech Wednesday that denounced Western countries as “evil powers” and called Israel the “rabid dog” of the Middle East.

The Obama administration has sought to brush aside the remarks while insisting that a deal would prevent Iran from obtaining a nuclear weapon and ease tensions in the region.

“We obviously condemn the comments of the ayatollah, which are abhorrent,” Samantha Power, the U.S. ambassador to the United Nations, said in a CNN interview on Thursday. “We have decades of mistrust, partly on the basis of comments like this, partly on the basis of continued steady progress toward a nuclear weapon. And that’s why we’re in these negotiations in the first place.”