Associated Press

DES MOINES, Ia. — The Iowa Supreme Court has said it will allow guns to be carried into county courthouses under certain restrictions, backing off a complete ban initiated in the spring after lawmakers passed a sweeping gun rights bill.

Chief Justice Mark Cady issued an order Tuesday revising the edict he'd written in June that banned guns from all courthouses in Iowa. The revised order allows county supervisors or other local government officials to file a written request to allow guns in the buildings.

When a request is made, the chief judge of the judicial district must write an order allowing guns in public areas that are not totally occupied by the court system.

RELATED:Limits on guns in childcare centers are blocked by governor's staff

Once a judge enters the order allowing guns, the state court system relinquishes to the requesting entity any authority over the regulation of weapons in the public areas, Cady's order said.

County courthouses in Iowa house courtrooms, judge's chambers and other court offices in the same building with county offices that handle driver's licenses, property taxes and other local government functions. Often, courts occupy entire floors of a courthouse and in some cases portions of floors are court offices while other space is occupied by other county agencies.

Cady's order in June that banned guns throughout all courthouses was issued after the Republican-controlled Iowa Legislature passed a new law that allowed concealed weapons to be carried into and around the Iowa Capitol by anyone with a gun permit. The law, which went into effect July 1, includes a paragraph that says anyone whose gun rights are usurped by local ordinance, rule, resolution, motion or policy may sue for damages.

Cady said in the June order that the Iowa Supreme Court had a duty to promote safety in the courts.

MORE SUPREME COURT:Justice lifts 'prior restraint' order against D.M. Register

His order was rejected by gun rights activists as an overreach of power. They'd considered the new Iowa law a sweeping victory for Second Amendment rights.

In response to the law, county supervisors in Woodbury County, where Republicans hold a majority, voted 3-1 in August to allow guns on county property including the courthouse in Sioux City. The board's lone Democrat Marty Pottebaum, a retired Sioux City police officer, opposed it.

"There are situations where people are not real thrilled to be there and it's just not a place for guns," Pottebaum said Wednesday.

Despite the supervisors' vote, the district's Chief Judge Duane Hoffmeyer issued an order upholding Cady's statewide courthouse ban to keep guns out.

Supervisors in Madison County voted unanimously in June to repeal its weapons ban for the courthouse in Winterset. The ban was passed just three years ago, a week after Cory Lee Daugherty, 29, pulled a handgun from his pocket as deputies attempted to take him to jail after he was sentenced to a 10-year prison sentence. No one was shot.

Gun rights advocates applauded Cady's revision.

"Iowans should not lose the right of self-defense just because they're conducting business in the county courthouse," said Aaron Door, executive director of Iowa Gun Owners, a gun rights advocacy group. Someone with an axe to grind or looking to commit murder will not be stopped by gun-free zone policy, he said.

IOWA POLL:Most believe more gun control won't reduce mass shootings

When Cady's order was issued in June, 72 counties prohibited weapons in the courthouse but just 10 counties had airport-like metal detectors at entrances. Courthouses in 27 counties have no known prohibition on weapons.

Cady's order issued Tuesday was the result of discussion with legislators, local officials and court staff and is an attempt to balance all interests, said court system spokesman Steve Davis.