Updated

In a victory for gun rights advocates, a federal appeals court on Tuesday struck down Illinois' ban on carrying concealed weapons -- the only total concealed-carry ban in the country.

The 7th Circuit Court of Appeals gave state lawmakers six months to come up with their own version of the law that legalizes concealed carry.

"We're extremely pleased with the ruling," Illinois State Rifle Association leader Richard Pearson said. "Now that the court has ruled ... we will work as soon as possible with legislators to craft a concealed-carry bill for the state of Illinois."

The 2-1 decision marks a huge win for gun rights advocates who have argued that the ban on concealed weapons violates the U.S. Constitution's Second Amendment and what they see as citizens' right to carry guns for self-defense.

A new law could be in place by January, Pearson said. A bill has already been written by Rep. Brandon Phelps that includes background checks, field provisions and other issues.

"Christmas came early for law-abiding gun owners," said Phelps, whose proposed legislation came within three votes of passing in 2011.

"I said on the floor, `A lot of people who voted against this, one of these days, you're going to wish you did, because of all the limitations and the safety precautions we put in this bill, because one of these days, the court's going to rule and you're not going to like the ruling.' Today's the day. The court's pretty much said there's no restrictions," he said.

Judge Richard Posner wrote in the court's majority opinion that the state "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."

He continued: "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."

Illinois Gov. Pat Quinn, who favors strict gun control laws and proposed an assault weapons ban earlier this year that lawmakers defeated, has vowed to again bring legislation that would prohibit the sale or possession of semi-automatic rifles and other guns.

Attorney General Lisa Madigan's office, which is responsible for defending the state's laws, said it was reviewing the ruling and would comment later Tuesday.

The Associated Press contributed to this report.