CHICAGO — Illinois Gov. Pat Quinn on Monday signed into law a measure legalizing civil unions for same-sex couples for the first time in the state.

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

State Rep. Greg Harris, D-Chicago, applauded the governor’s signature as a step toward equality.

“As great a victory as we celebrate here today, there’s more work to be done. Things can get better,” Harris said.

The measure, approved last month during the General Assembly’s lame-duck session, lets gay men and lesbians use civil unions as a way to enjoy several of the same rights as people who are married, ranging from sharing a nursing home room to being involved in end-of-life decisions. The law takes effect June 1. It also applies to heterosexual couples.

The lengthy bill signing ceremony took place at a packed Chicago Cultural Center.

“We are just so excited to join the handful of states that recognize equality,” said Quinn spokeswoman Brie Callahan.

Last month, Quinn declared the legislature’s approval a “proud day for the people of our state and the families of our state.”

But several opponents said civil unions equate to gay marriage, and many questioned why the post-election vote took place when the state is in a financial mess.

“We are the incompetence laughing stock of government mismanagement and misplaced priorities, and our one-party (Democratic) leadership spends our time on homosexual civil unions,” state Sen. Chris Lauzen, R-Aurora, said at the time.

Supporters defeated a heavy opposition lobbying effort led by the Catholic Conference of Illinois, which is headed by Cardinal Francis George.

A Chicago Tribune poll conducted in late September showed 57 percent approved of legalizing civil unions while 32 percent disapproved.