Illinois Governor Pat Quinn on Wednesday signed into law a bill extending marriage rights to same-sex couples, making the home state of President Barack Obama the 16th to allow such unions.

The Illinois law, which takes effect June 1, is the latest in a series of recent victories for gay rights, coming after Hawaii's governor signed gay marriage into law last week and after New Jersey Governor Chris Christie dropped his legal opposition to the unions in October.

"This new law is an epic victory for equal rights in America," Quinn said before signing the bill in a ceremony attended by about 3,000 people that included Chicago Mayor Rahm Emanuel and state leaders.

"Illinois is moving forward," Quinn said. "We are a model for our country. If the Land of Lincoln can achieve marriage equality, so can every other state in the nation."

Illinois state senators voted to legalize gay marriage in February, and the state House followed suit by a slim margin earlier in November.

Illinois currently allows civil unions, which gay rights activists have said does not go far enough.

But the proposal had been resisted by some African-American Democratic lawmakers who were under pressure from outspoken black Protestant churches to oppose it. The leadership of the Catholic Church in Illinois also opposed the proposal.

A Catholic bishop in Illinois, Thomas J. Paprocki of Springfield, said he planned an exorcism ritual to protest the law at the same time as the governor's planned signing on Wednesday.

Opponents had expressed concern that under the proposed gay marriage law, religious organizations that declined to allow their facilities to be used for gay marriages could face lawsuits. The amended version of the bill provides safeguards for religious organizations.

A year ago, only six states — Massachusetts, Vermont, New Hampshire, New York, Connecticut and Iowa — plus the District of Columbia recognized same-sex marriage, but the number has since more than doubled.

Maine, Maryland and Washington became the first to extend marriage rights to same-sex couples by popular vote with passage of ballot initiatives last November. Gay marriage also became legal this year in California, Delaware, Minnesota and Rhode Island.

On the other side of the issue, voters in more than two dozen states have approved state constitutional provisions that define marriage as a union between a man and a woman, according to the National Conference of State Legislatures.