ISTANBUL — Under strong U.S. pressure and a boycott threat from Syria’s exile opposition, U.N. Secretary-General Ban Ki-moon on Monday rescinded his invitation to Iran to attend the start of a conference intended to end nearly three years of violence.

In a statement, Ban said he had withdrawn the invitation to the opening session Wednesday at Montreux, Switzerland, because Iranian leaders failed to follow through on a promise to endorse the conference’s goal of naming a transitional government. Instead, in a series of statements distributed by the Iranian news agency IRNA, senior officials said they could not agree to that goal and would not participate in a conference that required them to.

“The secretary-general is deeply disappointed by Iranian public statements today that are not at all consistent with that stated commitment,” U.N. spokesman Martin Nesirky said in a statement. “Given that it has chosen to remain outside the basic understanding, he has decided that the one-day Montreux gathering will proceed without Iran’s participation.”

At issue was the basic aim of the conference as laid out in an agreement reached by the United States, Russia and other countries in June 2012. That agreement stipulated that negotiations would be held to establish a transitional government to write a new constitution and set elections. Members of that transitional government would be picked by “mutual consent” — a phrase the United States has said would eliminate the possibility of Assad taking part.

U.S. Secretary of State John Kerry was reported to be furious with Ban for extending the invitation in the absence of ironclad assurances from Iran that it would sign on to the earlier Geneva accord.

The dispute over Iran’s participation brought the entire conference to the brink of collapse. In a day of behind-the-scenes drama, Russia at one point threatened that it would not attend the talks and warned that the Syrian government would follow suit if Iran was not present, a source close to the diplomatic talks told McClatchy.

In the end, it was Ban who had to make an embarrassing retreat.

It appears that whatever assurances Ban received were later vetoed by other political actors in Iran. In a statement he made to reporters Sunday night, Ban said Foreign Minister Javad Zarif had told him that he understood that the goal of the talks was to set up a “transitional governing body with full executive powers.”

But in Tehran Monday, other officials said Iran would participate in the conference only if there were no preconditions.

If the invitation to Tehran is based “on accepting the Geneva I statement, it means a precondition, and Iran will not accept it,” said Ali Akbar Velayati, an adviser to Iran’s supreme leader, Ayatollah Ali Khamenei.

The withdrawal of the invitation brought a rare moment of triumph for the opposition — four-tenths of whose members walked out at a weekend conference over the decision to attend the meeting in Montreux and the later negotiations in Geneva.

In a statement Monday evening, the group welcomed Ban’s decision and reaffirmed that it will participate in the talks.