The mayor of Portland, Oregon, has made an “unconstitutional” attempt to shut down upcoming rallies against sharia and in support of President Donald Trump, according to the ACLU of Oregon.

Following a deadly hate-fueled attack last week, Mayor Ted Wheeler said Monday that the city would not issue permits to groups organizing “alt-right events” scheduled for early June. He also called on the federal government, which operates the plaza where the events are supposed to take place, to “immediately revoke” a permit issued to organizers of one rally and to not issue a permit for the other one.

But the ACLU of Oregon warned that the mayor could impede upon a “core, fundamental freedom of the United States” by censoring “unpopular speech.”

1. The government cannot revoke or deny a permit based on the viewpoint of the demonstrators. Period. https://t.co/P9gcNPAumH — ACLU of Oregon (@ACLU_OR) May 29, 2017

6. If we allow the government to shut down speech for some, we all will pay the price down the line. — ACLU of Oregon (@ACLU_OR) May 29, 2017

Tensions have been mounting in Portland in the days following a knife attack on the city’s MAX light-rail train. Jeremy Joseph Christian, a 35-year-old with white supremacist ties, is accused of fatally stabbing passengers Ricky John Best and Taliesin Myrddin Namkai-Meche on Friday after they attempted to confront him for harassing two teenage girls, one of whom was wearing a hijab.

“Our City is in mourning, our community’s anger is real, and the timing and subject of these events can only exacerbate an already difficult situation,” Wheeler wrote in a statement.

Mat dos Santos, the legal director of the ACLU of Oregon, said he doesn’t disagree that the Portland community is mourning. But he called the mayor’s decision to block the protests “a pretty clear case of government overreach.”

“We fundamentally believe that when the government acts to silence the speech of somebody whose speech we disagree with it has long-term problematic consequences for everyone,” dos Santos said. It violates both the U.S. and Oregon constitutions for a protest to be shut down solely because the government disagrees with participants’ viewpoints, he added.

Dos Santos said he was “shocked” by Wheeler’s statement on Monday, claiming he had advised members of the mayor’s staff not to block the rallies unless there were concerns for public safety. He said he wasn’t aware of any safety issues pertaining to either the “Trump Free Speech Rally” or “March Against Sharia,” set for June 4 and June 10, respectively.

“Of course, the First Amendment does have some limits,” dos Santos said. “If the government has concrete evidence of an imminent threat to public safety, they can and should address it, but they should do it in a restrictive way that eliminates the threat while protecting the First Amendment rights of others.”

The Trump Free Speech Rally plans to feature “live music, flags, and an uplifting experience to bring back strength and courage to those who believe in freedom” in “one of the most liberal areas on the West Coast,” according to the event’s Facebook page. The organizers of the March Against Sharia event say they intend to protect the freedom of religion by protesting “Sharia Law and its impact on Muslim women and children including honor killing and Female Genital Mutilation.”

It would have been “wholly appropriate” for Wheeler to reach out to the groups himself and ask them to reschedule, dos Santos said.

Michael Cox, Wheeler’s director of communications, said the mayor did not mean to “hamper political speech” and that his request to the federal government was based on security concerns, not differing political viewpoints.

“The mayor’s only goal is to keep this community safe,” Cox told HuffPost. “He believes that this rally is scheduled for the wrong time at the wrong place. While it may be constitutional, it is highly irresponsible.”

Violent altercations have threatened several public demonstrations in Portland in recent months. In April, the city’s annual Rose Festival parade was canceled after two anti-fascist groups threatened to “drag and push” those marching with the Republican Party. Earlier this month, self-described anarchists set fires and threw objects at police during a May Day protest.

Cox said the city is planning security measures as if the events will take place, but that it’s up to the federal government to decide whether they will. The Portland Police Department is also “collecting information about potential threats of violence,” he added, but would not comment on specific threats.

UPDATE ― May 31: The Portland March Against Sharia has been canceled, according to event organizer Scott Ryan Presler.

“Due to Mayor Wheeler’s inflammatory comments and what we feel is an incitement of violence, he has shamefully endangered every scheduled participant,” Presler wrote Wednesday on the event’s Facebook page. “Consequently, in order to ensure the safety of those who had planned on attending, we have taken the decision to cancel the Portland March Against Sharia.”

A march is still scheduled to take place in Seattle, he added.

Read Presler’s full post here.

America does not do a good job of tracking incidents of hate and bias. We need your help to create a database of such incidents across the country, so we all know what’s going on. Tell us your story.