Updated 5/31/2-13 4:25 p.m.

SPRINGFIELD, Ill. (AP) — The General Assembly has passed a bill that would make Illinois the last state in the nation to allow concealed carry .

The 45-12 tally sealed a deal that Senate Democrats worked out with the House, which had similar but rival legislation that failed in the Senate.  After the Senate vote, the House passed the bill 89-28, sending it to Gov. Pat Quinn for his signature.

Friday is the last scheduled day of the Legislature’s spring session, and just days before the court-ordered gun law deadline of June 9. The 7th U.S. Circuit Court of Appeals ruled in December that Illinois’ ban on the public possession of concealed weapons is unconstitutional.

Last week, the House overwhelmingly adopted a more permissive plan 85-30. But Senate Democrats voted it down, objecting to a provision that invalidated all existing local firearms ordinances, such as Chicago’s assault-weapons ban.

The negotiated settlement would allow local governments to retain those rules, but require the enactment of concealed carry. Local governments would also be blocked from approving new rules for transporting guns and assault-weapon restrictions.

Sen. Kwame Raoul, a Chicago Democrat and supporter of tighter restrictions, conceded ground on carrying guns in establishments that serve alcohol. Residents would be allowed to carry guns into restaurants and other business that serve alcohol if liquor comprises no more than 50 percent of their sales.

Chicago Democrats would have gotten all of what they requested in terms of specific gun-free zones, including mass transit buses and trains, schools, other government buildings, parks, hospitals and street festivals.

Mayor Emanuel issued a written statement offering measured praise for the legislation that passed.

“This bill strikes a better balance between the rights of gun owners and the unique public safety needs of Chicago and other municipalities than previous  proposals,” the mayor said. “This legislation will allow Chicago to set its own policies on assault weapons, high-capacity ammunition magazines, reporting of lost and stolen guns, and the location of gun shops. It also prohibits carrying loaded guns on public transportation, in our parks and schools, in bars and in government buildings.”

But Rep. Brandon Phelps, a southern Illinois Democrat who sponsored the House proposal, was able to keep in a provision that automobiles should be a “safe harbor,” meaning a secured gun could be kept in a car, even if it’s parked in a prohibited place.