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 chambers of the Legislature voted to override changes Gov. Pat Quinn made to the bill they approved more than a month ago. Even some critics of the law argued it was better to approve something rather than risk the courts allowing virtually unregulated concealed 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. The Chicago Democrat faces a tough re-election fight next year and has already drawn a primary challenge from former White House chief of state Bill Daley, who has criticized the governor’s handling of the debate over guns and other issues.