SPRINGFIELD-In a huge win for gun-rights groups, a federal appeals court in Chicago Tuesday tossed the state’s ban on carrying concealed weapons and gave Illinois’ Legislature 180 days to craft a law legalizing concealed carry.

“The debate is over. We won. And there will be a statewide carry law in 2013,” said Todd Vandermyde, a lobbyist for the National Rifle Association.

In a split opinion (see below), the 7th Circuit Court of Appeals reversed a lower court ruling in two cases downstate that upheld the state’s longstanding prohibition against carrying concealed weapons.

Illinois is the only state with an outright prohibition on concealed carry.

“We are disinclined to engage in another round of historical analysis to determine whether eighteenth-century America understood the Second Amendment to include a right to bear guns outside the home,” Judge Richard Posner wrote in the court’s majority opinion.

“The Supreme Court has decided that the amendment confers a right to bear arms for self-defense, which is as important outside the home as inside. The theoretical and empirical evidence (which overall is inconclusive) is consistent with concluding that a right to carry firearms in public may promote self-defense,” he continued.

“Illinois had to provide us with more than merely a rational basis for believing that its uniquely sweeping ban is justified by an increase in public safety. It has failed to meet this burden,” Posner wrote.

“The Supreme Court’s interpretation of the Second Amendment therefore compels us to reverse the decisions in the two cases before us and remand them to their respective district courts for the entry of declarations of unconstitutionality and permanent injunctions,” he continued.

“Nevertheless we order our mandate stayed for 180 days to allow the Illinois legislature to craft a new gun law that will impose reasonable limitations, consistent with the public safety and the Second Amendment as interpreted in this opinion, on the carrying of guns in public,” Posner said.

In a minority opinion, Judge Ann Williams wrote that Illinois is within its rights to ban weapons in “sensitive places” like government buildings, churches and universities in the name of safety.

“The Illinois legislature reasonably concluded that if people are allowed to carry guns in public, the number of guns carried in public will increase, and the risk of firearms-related injury or death in public will increase as well,” Williams said. “And it is also common sense that the danger is a great one; firearms are lethal.”

Attorney General Lisa Madigan, who was defending the state’s prohibition of concealed carry, remained silent on whether her office would appeal Tuesday’s ruling to the U.S. Supreme Court.