RICHMOND, Va. (WRIC/AP) — The Virginia Supreme Court denied an appeal filed by gun-rights groups who aimed to get an immediate injunction to stop Gov. Ralph Northam’s executive order temporarily banning all weapons on Capitol grounds ahead of Monday’s planned gun rally.

Attorney General Mark Herring tweeted the news Friday evening.

On Thursday, a Richmond Circuit Court judge upheld Northam’s temporary ban, prompting the appeal to the state’s Supreme Court.

Before the ruling, Herring had urged the state Supreme Court to reject the appeal.

The rally is expected to draw tens of thousands of activists to Richmond next week amid fears of violence.

Herring argued that an executive order by Gov. Ralph Northam banning guns from the state Capitol grounds for Monday’s rally is necessary to prevent the kind of violence seen during a white nationalist rally in Charlottesville in 2017. One woman was killed and more than 30 other people were hurt when a self-avowed white supremacist drove his car into a crowd of counter protesters.

“Determined to prevent another tragedy, the Governor issued a carefully limited Executive Order. The Order does not prevent anyone from speaking, assembling, or petitioning the government. Instead, it temporarily precludes private possession of firearms in a sensitive public place during a specified time to protect public safety and safeguard the rights of all citizens to peacefully speak, assemble, and petition their government,” the legal brief says.

Herring also argued the gun rights groups were asking the Supreme Court to “simply disregard the judgment of the Governor and the advice of seasoned law-enforcement officials” whom Northam said have found credible threats that Monday’s rally could include “armed militia groups storming our Capitol.”

Herring said the ban does not violate the rallygoers’ Second Amendment rights, and that any restriction is justified by the interests in protecting public safety and safeguarding everyone’s constitutional rights.