United Nations security personnel on Tuesday detained Israel’s ambassador to the U.N. shortly after he left the General Assembly Hall to protest a speech by Iranian President Ebrahim Raisi.

It was not clear why he was being detained, though he was later released. Fox News Digital has reached out to the U.N. for comment. The ambassador told Fox News Digital he was detained with "unacceptable" brutality.

Before storming out of the General Assembly Hall, Gilad Erdan held up a picture of Mahsa Amini, an Iranian woman who was brutally murdered last year by the country’s so-called morality police for not properly wearing her hijab. Amini’s murder sparked waves of protest across the Islamic Republic, which were met with brutal repression.

"The U.N.'s lost moral compass was on full display today," Erdan said in a statement to Fox News Digital. "Being detained for standing with the Iranian people and protesting a vile mass murderer who was given an audience on the global stage is utterly disgraceful. It is yet another example of the strong bias Israel suffers at the U.N. Other ambassadors have previously held signs for ideological reasons, including in recent sessions on the war in Ukraine, with no repercussions. I will not be deterred and will always stand up for what is right and just."

OUTRAGE AS IRAN PRESIDENT PREPARES TO ADDRESS UN: ‘WANTS TO KILL AMERICAN CITIZENS’

Israeli Ambassador to the UN

Israeli Ambassador to the U.N. Gilad Erdan was detained by security personnel Tuesday. (Fox News Digital)

A caption accompanying Erdan’s photo of Amini read: "Iranian women deserve freedom now!"

Raisi’s presence at the U.N. General Assembly drew protesters outside the hall.

Erdan, who left the General Assembly Hall with the Israeli delegation, said the U.N. had reached "a new moral low" by giving a platform to Raisi, who he derided as a "vile murderer."

"While the butcher of Tehran is speaking at the UN and is being respected by the international community, hundreds of Iranians are protesting outside, shouting and calling on the international community to wake up and help them," Erdan said in a statement.

ISRAELI ARMY COMMANDER SENTENCED TO MILITARY PRISON OVER MISTAKEN SHOOTING OF INNOCENT PALESTINIAN DRIVER

Mahsa Amini

Iranian protesters voice outrage after the tragic death of 22-year-old Mahsa Amini in 2022. (AP Photo/Markus Schreiber, File)

"It is a disgrace that member states stay to listen to a mass murderer," he said. "It should not be possible for a murderer with blood on his hands to receive a platform here at the U.N. I left the speech to make it clear that the State of Israel stands by the Iranian people. I call on the international community to stop the madness and prevent murderers and anti-Semites from coming and speaking here at the U.N."

Erdan told Fox News Digital he wanted to draw the attention of the international community to the "hypocrisy and the moral distortion" of the U.N. He said the organization was "founded to prevent atrocities" but gave a platform to a "mass murderer who denies, distorts the Holocaust and threatens to annihilate the Jewish people and is murdering his own people and women and protesters." 

"The U.N. listens to [Raisi] carefully while so many people are being murdered, killed, suffer because of him and his ruthless regime," Erdan said.

"So I decided to show him and remind everyone the struggle of the Iranian women, and also to remind the world and the Iranian people that they are not our enemies, that the people of Israel support and stand in solidarity with them, whatever their regime is telling them and lying to them about Israel," he continued. "This is not the truth. Israel is standing with the people of Iran, and we want to live in peace with the people of Iran. But their regime is the one who is preventing it and causing them to suffer so much."

Iran's President Ebrahim Raisi

Iranian President Ebrahim Raisi holds up the Quran as he addresses the 78th session of the U.N. General Assembly in New York City on Sept. 19, 2023. (Reuters / Mike Segar)

Raisi’s speech at the U.N. General Assembly was laden with shots at the United States, which he blamed for instability in the world.

"[A]s independent nations increasingly align themselves towards cooperation and convergence, certain powers are attempting to incite conflicts in different regions employing a Cold War mentality, they strive to reconstitute blocks on a global [scale]," Raisi said.

CLICK HERE TO GET THE FOX NEWS APP

"This regressive endeavor poses a significant threat to the security and prosperity of nations. The Islamic Republic of Iran staunchly maintains that the formation of a new East-West divide should not be permitted to take shape."

Former President Trump sanctioned Raisi for his role in carrying out the massacre of 5,000 Iranian political prisoners in 1988 and the clerical regime’s slaughter of 1,500 Iranian demonstrators in 2019.

Fox News’ Marta Dhanis and Benjamin Weinthal contributed to this report.