Illinois became the last state in the nation to allow public possession of concealed guns as lawmakers rushed Tuesday to finalize a proposal ahead of a federal court’s deadline.

Both houses of the General Assembly voted to override changes Gov. Pat Quinn made to the bill they approved more than a month ago. Some lawmakers expressed fear that failure to pass something would mean virtually unregulated weapons in Chicago, which has endured severe gun violence in recent months.

The Senate voted 41-17 in favor of the override Tuesday afternoon after the House voted 77-31, margins that met the three-fifths threshold needed to set aside the amendatory veto. Quinn had used his veto authority to suggest changes such as prohibiting guns in restaurants that serve alcohol and limiting gun-toting citizens to one firearm at a time.

Quinn had predicted a “showdown in Springfield” after a week of Chicago appearances to drum up support for the changes he made in the amendatory veto.

But lawmakers had little appetite for fiddling any further with the legislation on the deadline day the 7th U.S. Circuit Court of Appeals had set for ending what it said was an unconstitutional ban on carrying concealed weapons. Without action, the previous gun law would be invalidated and none would take its place.

“If we do not vote to override today, at 12:01 a.m. tomorrow, July 10, there are no restrictions upon people who want to carry handguns in the public way,” said Sen. Kwame Raoul, a Chicago Democrat who negotiated the legislation with House sponsors.

As a nod to Quinn, who faces a tough re-election campaign in 2014 and has already drawn a stiff primary challenge from former White House chief of staff Bill Daley, Senate President John Cullerton floated legislation that addressed the governor’s worries. But the Senate ultimately approved a follow-up bill that only mentioned two of his suggestions.

The House rejected the plan later Tuesday, including Cullerton’s proposal to remove a requirement that gun-free zones specifically mentioned in the law — schools, for instance — post signs that they’re off-limits to gun.

The law as approved by the Legislature permits anyone with a Firearm Owner’s Identification card who has passed a background check and undergone gun-safety training of 16 hours — longest of any state — to obtain a concealed-carry permit for $150.

The Illinois State Police would have six months to set up a system to start accepting applications. Spokeswoman Monique Bond said police expect 300,000 applications in the first year.

For years, powerful Chicago Democrats had tamped down agitation by gun owners to adopt concealed carry. So gun activists took the issue to court and the 7th Circuit ruled the Second Amendment permits citizens to take guns out of their homes. The court’s original June 9 deadline was extended by a month when lawmakers didn’t sent Quinn the plan until early that month.

Quinn had urged Democratic Attorney General Lisa Madigan to appeal the ruling to the U.S. Supreme Court. A spokeswoman for Madigan, another potential gubernatorial rival, said Tuesday there’s no reason to appeal now, since Illinois has a concealed-carry law.

With the negotiated law, gun-rights advocates got the permissive law they wanted, instead of a New York-style plan that gives law enforcement authorities wide discretion over who gets permits. In exchange, Chicago Democrats repulsed by gun violence got a long list of places deemed off limits to guns, including schools, libraries, parks and mass transit buses and trains.