SPRINGFIELD, Ill. — The Illinois state Senate on Thursday approved a bill that would legalize marriage equality for same-sex couples.

Prior to the vote, state Sen. Martin Sandoval (D) stood in favor of the measure to declare, “It’s a new day in the state of Illinois.”

The bill passed by a vote of 34 in favor, 21 opposed.

The bill’s sponsor, Sen. Heather Steans (D-Chicago), called it “a vote for the history books.”

“We have the opportunity today to welcome all families in Illinois as equally valued,” she said.

Before approving the measure, the Senate attached an amendment Thursday that explicitly states no church or other religious organization will be forced to solemnize same-sex marriages. It also says churches cannot be sued if they don’t allow their parishes to be used for same-sex marriage ceremonies.

Sen. Jason Barickman (R-Champaign), was the only Republican to vote yes. He said he worked with Steans on the amendment before pledging his support.

“I think it was the right thing to do,” Barickman said. “It’s a vote that I understand some have varying opinions on, but I feel that I voted in the correct way.”

The Valentine’s Day vote marked the first time a marriage equality has passed on the floor of either chamber of the state Legislature.

Steans and other supporters tried to pass it during the January lame duck session. But after getting approval from a Senate committee, Steans opted not to call for floor action, saying it didn’t have enough votes.

Three Democrats joined Republicans in voting no, while two were absent and two voted present.

In addition to religious freedom concerns, opponents said Thursday they worried that the bill would change what children are taught in schools. Others said it would diminish the sanctity of marriage.

“People have a right to live as they choose,” said Sen. Kyle McCarter (R-Lebanon). “They don’t have a right to redefine marriage for all of us.”

Supporters said it was a matter of civil rights. Several lawmakers talked about family and friends who are gay and wanting to give them the same rights and protections that same-sex couples enjoy.

The legislation now heads to the state House, where, like the Senate, Democrats maintain a majority.

Rep. Greg Harris (D-Chicago), said he “the prospects are very good” in the House, where he’s the bill sponsor.

If the bill makes it to Democratic Gov. Pat Quinn’s desk, Illinois would become the 10th state in the nation to extend marriage rights to same-sex couples.

Quinn, a supporter of marriage equality, applauded the Senate passage on Thursday, and pledged to sign the “historic” bill.

Thursday’s vote came two years after Illinois lawmakers approved civil unions, which provide legal recognition of a partnership between two people, regardless of gender. But same-sex marriage supporters called the designation “second class status.”

Associated Press contributed to this report.