The city official who organized an event on the steps of the District government building where a speaker directed anti-Semitic slurs against a Jewish lawmaker resigned Tuesday, just hours after a volatile council meeting where members debated how to respond to the ­incident.

Joshua Lopez, whom Mayor Muriel E. Bowser (D) paid as a consultant in her 2014 campaign and appointed to the board of the public housing authority, faced scathing criticism over a “unity rally” he organized last week to defend D.C. Council member Trayon White Sr. (D-Ward 8).

White has been at the center of controversy for the past month after it was reported that he repeated anti-Semitic conspiracy theories on his Facebook page and in a meeting with the mayor and council.

White had also donated $500 from a fund meant for his constituents to a Chicago event for the Nation of Islam, where leader Louis Farrakhan said Jews were his enemy. He had also visited the U.S. Holocaust Memorial Museum with a Jewish leader as a way to try to repair relations but left the tour early, sparking further criticism.

White, who faced calls for censure, has stood by his donation and said he was done apologizing.

The event organized by Lopez sparked an uproar after a representative of the Nation of Islam called D.C. Council member Elissa Silverman (I-At Large) a “fake Jew” for criticizing Farrakhan.

Silverman and four other lawmakers called on the mayor to dismiss Lopez, who held the megaphone for the speaker. Bowser had said Lopez needed to apologize, but she did not move to fire him from his post, which carries a $4,000 annual stipend.

Joshua Lopez poses in front of “My Culture, Mi Gente,” a mural by Joel Bergner in Northwest Washington in 2016. (Astrid Riecken for The Washington Post)

Lopez did apologize for the speaker’s comments and said he did not want to risk a physical confrontation by forcing the man to leave. He noted that he nudged the speaker and unsuccessfully asked him to stay positive.

That wasn’t enough to quell the controversy, as several Jewish community leaders as well as the Downtown Cluster of Congregations called for Lopez to leave public office.

“It became clear that this issue was becoming highly politicized and people were using it as an opportunity to attack my family and people I care about,” Lopez said in a statement on Tuesday.

He later told The Washington Post, “I’m now a private citizen and can return to my political activism without having it unfairly associated with anyone else.” The mayor never asked him to resign, he said.

The event that triggered his resignation, which drew about 25 people, was fairly low key until Abdul Khadir Muhammad, a Mid-Atlantic representative for Farrakhan, spoke.

“What is the fake Jew that calls themselves Jews, the ADL, the JDL,” Muhammad said, referring to the Anti-Defamation League and Jewish Defense League.

Muhammad tore into Silverman, one of two Jewish members of the D.C. Council. “Elissa Silverman talking about Brother Farrakhan can’t come into D.C. no more. That will never happen,” he said. “You got your nerve to say Farrakhan can’t come back to D.C. What nerve are you, you fake Jew?”

He later shouted “Termites!” when another speaker mentioned Jews. Although the rally was organized to show support for White, the council member did not attend.

On Tuesday morning, the D.C. Council had a heated discussion during a breakfast meeting over how to respond to those comments, as well as anti-Semitism in general in the city. White arrived half an hour late to the breakfast, where he occasionally checked his phone and tweeted. He was the only lawmaker who did not speak.

Silverman opposed a resolution generally condemning anti-Semitism, arguing it would be “hollow.”

“We need to take a concrete action to show the residents of our city that there’s a consequence to creating a platform for hate speech,” Silverman said.

Several lawmakers called ­Lopez — who had worked on campaigns for former mayor Adrian Fenty as well as Bowser — a divisive figure who should have no role in government.

Mendelson said he would circulate a letter seeking Lopez’s removal to individual council members, but it was unclear whether a majority would sign.

The meeting was disrupted by Rabbi Shmuel Herzfeld of Ohev Sholom Synagogue in Northwest Washington, who entered the room and denounced the council for not censuring White or taking a harder line against Lopez’s event.

Dressed in a prayer shawl and yarmulke, Herzfeld said the anti-Semitic remarks uttered on the steps of a government building were threatening to Jewish residents. “You endangered my children,” he said, as Council Chairman Phil Mendelson (D) walked over to him, murmured that he was disturbing the meeting and tugged at his arm. “This is not a time to be quiet! Our city is better than this!”

White sat a few feet from Herzfeld as the rabbi demanded his censure. He said nothing and continued to eat breakfast.

After the breakfast wrapped up, all 13 members of the council went to the steps of the government building for an impromptu news conference, where Mendelson denounced anti-Semitism and the rally organized by Lopez.

“We want to make it clear that the members of the council, all of us, stand together in condemning that kind of speech,” Mendelson said.

Shortly after, Lopez confirmed his resignation.

“Josh did the right thing,” Silverman said.

LaToya Foster, a spokeswoman for Bowser, said, “We will continue to move forward in our dialogue, showcasing how Washington, D.C., remains an inclusive and progressive place.”