The United Nations on Monday revoked an invitation to Iran to attend a crucial peace conference on Syria in Switzerland, culminating a day of chaotic international diplomacy that included loud U.S. objection to Iran’s participation and a threat by the Syrian opposition to boycott the talks.

Under intense American pressure, U.N. Secretary General Ban Ki-moon rescinded the invitation to Iran, issued only 24 hours earlier. The main Syrian opposition bloc almost immediately announced that it would join the talks, which are set to begin Wednesday.

Secretary of State John F. Kerry personally lobbied Ban to rescind the invitation, and U.S. officials suggested that Washington would pull out if Iran was there, jeopardizing an event that has taken eight months of negotiations to bring to fruition.

The brinkmanship over who would attend and on what terms overshadowed the already modest expectations for a session that few expect will lead to the quick exit of Syrian President Bashar al-Assad. It also underscored that although the United Nations is the conference’s official host, the international body is not calling all the shots.

In reversing course, the U.N. chief echoed the U.S. position that Iran had not endorsed the terms under which the conference is being held. Previously, Ban and other U.N. officials had maintained that Iran, as the main military backer of the Syrian regime and a key Middle East power broker, must be at the table for any meaningful talks about ending the nearly three-year-old Syrian conflict. His office said Monday that Iran had appeared to back the conference goals during recent conversations.

Under intense American pressure, U.N. Secretary General Ban Ki-moon, right, rescinded an invitation to Iran to attend peace talks on Syria. It had been issued only 24 hours earlier. (Eric Thayer/Reuters)

But Ban “is deeply disappointed by Iranian public statements today that are not at all consistent with that stated commitment,” his office said in announcing that Iran was no longer welcome.

The much-delayed peace conference is now set to go ahead Wednesday with foreign ministers from more than 30 nations and continue later in the week with talks between negotiators for Assad and representatives of the Syrian opposition. The sessions would be the first direct talks since the war began.

“We are hopeful that in the wake of today’s announcement, all parties can now return to focus on the task at hand, which is bringing an end to the suffering of the Syrian people and beginning a process toward a long-overdue political transition,” State Department spokeswoman Jen Psaki said Monday.

Earlier in the day, U.S. officials said Iran is prolonging the war and undermining chances for peace, and should not be allowed to sit at the table with diplomats from countries that are legitimately trying to end the fighting.

The United States opposed Iranian participation unless Tehran endorsed ground rules set in 2012. Those terms state that the goal of the peace talks is a transitional government in Syria, established by the mutual consent of the Assad government and political opponents. Assad’s backers and opponents have always interpreted that goal differently.

Ban had told reporters Sunday evening that Iran had been invited after it agreed to accept that the premise of the talks is to pave the way for a transitional authority in Syria that would take power away from Assad.

Iranian officials had given no public indication that they had ever accepted those terms. Marzieh Afkham, a spokeswoman for the Foreign Ministry, said Iran accepted the invitation but added that “we do not accept any precondition to take part.”

Assad further antagonized the opposition with a media interview that indicated he has every intention of remaining in power.

The Syrian Opposition Coalition, which voted only the previous day to attend the talks after eight months of bitter debate, had issued a Monday evening deadline for the United Nations to rescind the invitation to Iran. Otherwise, the opposition group said, it would not attend the event.

“We cannot attend if Iran is there, and the coalition is united on this point,” coalition member Hadi al-Bahra said.

The disputes exposed the depth of the divisions within the international community over the Syrian conflict, which has killed more than 100,000 people. Assad’s chief backers, Russia and Iran, have never endorsed the view shared by the United States and its European and Arab allies that the conference should be aimed at negotiating an end to Assad’s rule.

Syrian Opposition Coalition members said they were stunned by the U.N. announcement, which came just three days before the conference and prompted some who had been planning to attend to cancel plane tickets.

The twist plunged the fractious coalition back into disarray only hours after it reached a decision to attend the talks. Coalition members said they huddled in meetings overnight Sunday as diplomats from around the world bombarded them with telephone calls urging them not to withdraw.

The decision to attend had been approved by fewer than half of the coalition’s members, and the unexpected inclusion of Iran put those who had supported attending the conference “in a very bad position,” said coalition member Abdulrahman Haj, who was among those who voted to go. “They are very weak now.”

“Iran is the biggest supporter of the regime, not only with weapons and money but also fighters,” he added, referring to Tehran’s support of the thousands of Shiite militiamen from Lebanon and Iraq, as well as Iran, who are fighting on behalf of Assad.

The 2012 agreement upon which the peace talks are premised was vague about the fate of Assad, leaving it unclear whether the talks are intended to remove him or simply weaken his authority. Although the United States has repeatedly stressed that Assad must leave office, Russia has continued to support him, and the opposition feared that if Iran attended the conference, it would serve only to reinforce his grip on power.

In an interview with the Agence France-Presse news agency, Assad made clear that he does not intend to relinquish power and said he plans to stand for reelection this year.

“I will not hesitate for a second to run for election,” he said. “In short, we can say that the chances for my candidacy are significant.”

Gearan reported from Washington. Ahmed Ramadan in Beirut contributed to this report.