"We believe in civil rights, and we believe in civil unions," Quinn said. "We believe in liberty and justice for all."

The law takes effect June 1 and allows gays and lesbians to use civil unions as a way to get many of the same rights given to heterosexual couples when they marry. It also applies to opposite-sex couples to signify a commitment short of marriage.

Protections include sharing a nursing home room, visiting a loved one in a hospital and preventing those in a civil union from testifying against each other in court. Couples who enter into civil unions also will be able to make funeral and end-of-life decisions, inherit property and get certain employment-related benefits such as insurance.

"This is critical," said sponsoring Rep. Greg Harris, D-Chicago. "This is making sure that at the time of life when people need government to support them, that it will be there and treat one set of neighbors equally as the next set of neighbors."

Lawmakers narrowly approved the measure during their lame-duck session in December, with several opponents arguing that civil unions equated to gay marriage. Others questioned why the vote took priority over dealing with the state's massive budget issues.

But that opposition didn't dampen the celebration Monday, as hundreds of people lined up hours before the bill-signing ceremony to get a seat. Supporters included Cindy Savage and Julia Zayas-Melendez of Rogers Park, who spent much of the ceremony with their arms around each other.

The couple married last year in Massachusetts, but the union was not recognized in Illinois. Now it will be.

"For us it means our marriage will be recognized by the state of Illinois as something other than just living together and sharing a mortgage," Savage said. "On a larger scale, it's one more step toward equality."

While supporters said civil unions marked an important step forward for Illinois, they said the next goal is to have the federal government recognize same-sex couples, whether it be through civil unions or marriage.

"Every generation has a moment like this where we can say, 'We were there, we were part of it and we saw it happen,'" said Marc Moder, who attended the bill signing with partner Brad Krillenberger and several friends. "Hopefully the next gay generation will also have this when we get marriage equality in the United States, when we'll all be equal and we won't have to worry about milestones."