UNITED NATIONS -- The tensions between the U.S. and Iran spilled into United Nations headquarters Thursday, as member nations sparred over the series of escalations that brought the Middle East close to a new military conflict this week.

A Security Council meeting originally called to discuss the U.N. Charter morphed into an hourslong debate featuring dozens of countries sounding off on the conflict -- including several U.S. adversaries who used the forum to take shots at the Trump administration.

US SAYS SOLEIMANI KILLING WAS 'SELF-DEFENSE' AHEAD OF TENSE UN MEETING

“At present the United States’ unilateral military adventurism has led to the tensing of the situation in the Middle East Gulf region,” Chinese Ambassador Zhang Jun said.

“How is the council silent vis-a-vis the U.S. assassination crime against Iranian and Iraqi leaders that were fighting ISIS and Nusra front in Syria and Iraq?” Syrian Ambassador Bashar Jaafari said.

The session had been set up before the U.S. killing of Iranian Gen. Qassem Soleimani in a strike in Baghdad last week. But with the strike, and the resultant Iranian missile attacks on U.S. bases in Iraq, Mideast tensions took center stage.

The U.S. took out Soleimani, the head of the Islamic Revolutionary Guard Corps Quds Forces, days after Iranian-backed militia supporters stormed the U.S. embassy in Baghdad. Administration officials have said that the strike was conducted to deter imminent attacks on U.S. interests.

“This decision was not taken lightly,” U.S. Ambassador Kelly Craft said at the U.N. “For years Iran and Iranian-supported militias in the region have threatened the lives of Americans and shown unyielding contempt for the authority of the United Nations.”

Earlier, in a letter to the president of the council, she said the actions were “in the exercise of its inherent right of self-defense.”

Iran responded to the attack on Tuesday by firing ballistic missiles at bases in Iraq that house U.S. troops -- but there were no U.S. or Iraqi casualties. President Trump said Wednesday that the regime “appears to be standing down” but that the U.S. would impose economic sanctions “until Iran changes its behavior."

TRUMP SAYS IRAN 'APPEARS TO BE STANDING DOWN,' MISSILE STRIKES RESULTED IN NO CASUALTIES

Iran was scheduled to be one of the speakers at the U.N. meeting later Thursday, although Iranian Foreign Minister Javad Zarif would not be attending after he said the U.S. denied him a visa.

The Iranian ambassador said in a letter Wednesday that its response was “measured and proportionate.”

“Seriously warning about any further military adventurism against it, Iran declares that it is determined to continue to, vigorously and in accordance with applicable international law, defend its people, sovereignty and territorial integrity against any aggression,” the letter added.

A number of other members at the U.N. also took aim at the U.S. for its reported decision to deny Zarif a visa. Russian Ambassador Vasily Nebenzya called it an example of the U.S.’ “violation and noncompliance of international law.” Nebenzya also decried what he called “extrajudicial reprisals against an official of a sovereign state.”

But many others stuck to more general calls for peace, appeals for de-escalation and testaments to the importance of the multilateral system.

“War is never inevitable; it is a matter of choice, and often it is a product of easy miscalculations,” Secretary-General Antonio Guterres said in his remarks.

CLICK HERE FOR THE FOX NEWS APP

Craft, meanwhile, had in her letter affirmed the U.S. desire for peace and said that the U.S. “stand[s] ready to engage without preconditions in serious negotiations with Iran, with the goal of preventing further endangerment of international peace and security or escalation by the Iranian regime.”

However, in her remarks to the council, she also warned that Trump would act “decisively” in the case U.S. troops or interests are threatened.

“President Trump has made it clear his highest and most solemn duty is the defense of our nation and of its citizens and so we will act decisively in the exercise of our inherent right of self-defense to protect Americans when necessary, as is recognized under the Charter,” she said.

Fox News' Ben Evansky contributed to this report.