A judge on Tuesday blocked a ban on the open display of guns near Michigan polling places on Election Day, agreeing with gun rights advocates who had claimed the Democratic secretary of state failed to follow state law with her sudden order.

Gun rights groups accused Secretary of State Jocelyn Benson of exceeding her authority in banning people from openly carrying guns within 100 feet of voting sites.

The Oct. 16 order came after the FBI recently busted an alleged plot to kidnap Gov. Gretchen Whitmer, execute an armed raid on the state Capitol, and target and kill law enforcement. But Benson failed to go through a formal rule-making process required under state law, Judge Christopher Murray said.

MICHIGAN BANS OPEN CARRY OF GUNS AT POLLING PLACES AT POLLING LOCATIONS

Compliance “is no mere procedural nicety,” Murray said. “Instead, our appellate courts have repeatedly emphasized the importance of the democratic principles embodied in the [law], which requires notice and an opportunity to be heard on the subject under consideration.”

Earlier in the day, Assistant Attorney General Heather Meingast said lawmakers have given secretaries of state discretion to set certain election rules, including safety. Separately, armed critics upset with the governor's orders about controlling the coronavirus have rallied at the Capitol.

“There are dozens — we’ve had numerous complaints,” Meingast told the judge. “There are voters who are afraid. There are election workers who are afraid to go to work on Election Day.”

MINNESOTA AG INVESTIGATING OUT-OF-STATE FIRM RECRUITING ARMED VETERANS TO MONITOR POLLING PLACES

In this Sept. 24, 2020, file photo, Michigan Secretary of State Jocelyn Benson speaks in Detroit. On Tuesday, Oct. 27, 2020, a judge blocked a sudden ban on the open display of guns near Michigan polling places on Election Day. (AP Photo/Paul Sancya, File)

In this Sept. 24, 2020, file photo, Michigan Secretary of State Jocelyn Benson speaks in Detroit. On Tuesday, Oct. 27, 2020, a judge blocked a sudden ban on the open display of guns near Michigan polling places on Election Day. (AP Photo/Paul Sancya, File)

Murray said voter intimidation already is illegal and state laws passed by the legislature and signed by the governor “already provide law enforcement with the tools to stop those whose goal it would be to intimidate voters, whether with or without a firearm," according to Detroit News.

Furthermore, open carry isn’t allowed in some voting locations, such as churches, and concealed carry is prohibited in both churches and schools.

Attorney General Dana Nessel, a Democrat, pledged to appeal Murray's decision with just days left until the election. Benson's policy caused blowback from some county sheriffs who had said they wouldn't enforce it. The Michigan Association of Chiefs of Police also had panned it.

CLICK HERE TO GET THE FOX NEWS APP

“To be clear: This case is not about the fragile state of mind of 21 voters, and what (Benson) envisions is the appropriate level of wokeness by voters,” Dean Greenblatt, attorney for the group Michigan Open Carry, told the judge. “It’s the question of raw abuse and assumption of power not authorized by law.”

The Associated Press contributed to this report.