UNITED NATIONS — The top diplomats of the United States and Iran on Thursday held their first substantive meeting since the 1979 Iranian Revolution, hoping that within six months they can come to terms on Iran’s disputed nuclear ambitions and find a new foundation for their relationship after decades of antagonism.

Secretary of State John F. Kerry sat down with Iranian Foreign Minister Mohammad Javad Zarif and diplomats from five other world powers on the sidelines of the United Nations’ annual gathering to determine whether a new Iranian government and Washington “can continue to chart a way forward,” a senior Obama administration official said before the meeting.

Kerry said afterward that the meeting had been “constructive.” He and Zarif spoke separately for about half an hour during the gathering.

“We had more than a chat,” Zarif said later, suggesting the talk was substantive.

The six nations and Iran agreed to a formal meeting Oct. 15 and 16 in Geneva, officials said.

Catherine Ashton, the European Union’s foreign policy chief, said the diplomats had all agreed to “go forward with an ambitious time frame.”

Zarif said he was optimistic about the talks. “We agreed to jump-start the process so we could move forward — toward finalizing it in a year’s time,” he told reporters later in the evening, after a speech at the Asia Society by Iranian President Hasan Rouhani.

“We will move forward, but we will test each other as we go along,” he added.

Kerry signaled that he would quickly test whether Rouhani’s government was ready for compromise and was not seeking simply to drag out negotiations while Iran’s nuclear program advances.

“I will tell you when they’re serious,” Kerry told reporters earlier in the day. The meeting of the so-called P5-plus-1 diplomatic group convened during a week in which both Presidents Barack Obama and Rouhani told world leaders that they sought an opening to better relations.

Diplomats have hinted that the discussion between the United States and Iran could vault over the plodding path of the P5-plus-1, which has offered Iran limited relief from Western economic penalties in return for a halt to some of its most threatening nuclear activities. The diplomatic group consists of the five permanent members of the U.N. Security Council plus Germany.

For now, officials say, the primary talks will take place at the group meetings. But one-on-one contacts between the U.S. and Iranian officials, which recently included an exchange of letters between Rouhani and Obama, will continue and could become the place where the most important communications take place, some analysts believe.

Although Obama and Rouhani have both signaled their strong desire for progress, their appearances in New York have underscored how little room they have to make compromises, because of allies at home and abroad who are deeply fearful of a deal.

In an interview Wednesday with CNN, Rouhani appeared to depart from Iranian practice by acknowledging the Holocaust. According to a CNN translation, he referred to it as a “crime that the Nazis committed toward the Jews” and called it “reprehensible and condemnable.”

But the comments touched off a storm among conservatives in Iran. A semiofficial news agency denied that Rouhani had made such comments and accused CNN of fabricating the quotes.

Obama too has felt the heat from allies who fear he may be taken in by an adversary that has allegedly cheated on United Nations nuclear rules for decades.

Israeli Prime Minister Benjamin Netanyahu offered formal support for the talks, but he also called Rouhani a “wolf in sheep’s clothing” and warned against giving away too much.

At home, Obama faces warnings from a Congress that is united in anti-Iran zeal as on few issues.

The gap between Obama and Congress on Iran could provoke an all-out battle if the president starts making concessions.

But some Democrats close to the White House say they believe Obama is excited by the opportunity to make headway on the long Iranian standoff. Some expect him to sidestep Congress by using executive powers to ease sanctions, and note that, as a second-term president, he is somewhat insulated from political backlash.

Iran, aware that Congress may be a roadblock, seems to be preparing to ask for an easing of sanctions that can be granted without lawmakers’ agreement. The Iranian press has reported in recent weeks that the Islamic Republic wants to be reconnected to a Belgium-based financial network called SWIFT that allows countries to move their money around the globe.

Battered by the loss of oil income, Iran is also struggling to access money it is holding overseas.

The United States and allies are likely to be looking for other concessions from Iran to reduce the immediate threat from its nuclear program, which some governments fear may be only months from attaining nuclear weapons know-how.

The West wants Iran to close down its bomb-resistant underground nuclear facility at Fordow; halt operations at a plutonium facility; ship out its stockpile of medium-enriched uranium, which could be rapidly turned into bomb fuel; and halt all uranium enrichment.

But although Iran has signaled some willingness to reduce its stockpile of medium-enriched uranium and to offer more “transparency” in its program, Rouhani has not yet embraced a concept that is key to any deal: an acknowledgment that Iran is willing to accept limits on its nuclear program.

Aaron David Miller, a longtime U.S. diplomat in the Middle East who is now a vice president at the Woodrow Wilson International Center for Scholars, wrote Thursday in a Los Angeles Times op-ed that the new round of negotiations is going to be “a wild and unpredictable ride.” He also said: “If you like happy Hollywood endings, go to the movies.”