Following months of intense lobbying from both sides of the debate, Illinois lawmakers narrowly passed a bill Tuesday that would legalize same-sex marriage in the state. The bill will become law as soon as Governor Pat Quinn, a Democrat, signs it, which he is expected to do. Same-sex couples would be able to get married starting June 1, 2014.

Illinois’ same-sex marriage bill, SB0010, needed 60 votes to pass the Illinois House. According to The Chicago Tribune, initial test votes showed the bill was just shy of reaching those votes, with 59 lawmakers in favor of the bill. But the measure passed Tuesday 61 to 54, with two voting present.

The House passed the bill around 4 p.m., sending the law back to the Senate with an amendment to change the effective date to next June. An hour later, the Senate voted on the bill, clearing it 32 to 29 votes.

"To treat all our citizens equally in the eyes of the law we must change this," Rep. Greg Harris, D-Ill., the chief sponsor of the marriage equality bill, said on the floor of the Illinois General Assembly. “This bill will give them a better future. … It’ll help families to show their love and commitment to each other and give all families a chance to live as full and equal citizens in the greatest country on the face of the earth.”

President Barack Obama, who was an Illinois state senator before his election to the U.S. Senate in 2004, reacted quickly to the passage of Illinois’ gay marriage bill, tweeting: “This is huge. The Illinois House just passed marriage equality.”

The president elaborated in a statement released shortly afterward by the White House. "As president, I have always believed that gay and lesbian Americans should be treated fairly and equally under the law," Obama said. "Over time, I also came to believe that same-sex couples should be able to get married like anyone else. So tonight, Michelle and I are overjoyed for all the committed couples in Illinois whose love will now be as legal as ours – and for their friends and family who have long wanted nothing more than to see their loved ones treated fairly and equally under the law."

The bill will now go to Quinn, who has previously said he would sign it, but it’s unclear when exactly he will do so.

“Today the Illinois House put our state on the right side of history,” the governor said in a statement. “Illinois is a place that embraces all people and today, we are an example for the nation.”

Illinois’ same-sex marriage bill first cleared the Senate on Valentine’s Day this year, with 33 Democrats and a single Republican voting in favor of it. Supporters thought the bill would pass the House in March, but backers took months to secure enough yes votes to gain lawmakers’ approval.

Not everyone celebrated the passage of Illinois’ same-sex marriage bill. Opponents of the measure, who have been lobbying arduously against it since the law cleared the Senate in February, voiced their disapproval over its endorsement.

“Regardless of the passage of SB10, we will always believe that marriage is between one man and one woman,” Bishop Larry D. Trotter, who helped lead opposition to the bill, said, according to the Chicago Sun-Times. “Yet we will still love the members of the LGBT community. We pray God’s grace, mercy and blessings over the state of Illinois and the United States of America.”

"This issue is not just about two adults and their emotional relational and financial commitment to another," said state Rep. Tom Morrison, a Republican. "Redefining marriage has far reaching implications in our society."

Morrison, who voted against the measure, said that “redefining marriage” had “far reaching implications in our society. He added that a vote against the bill “does not mean you’re a bigot.”

“Everyone’s free to live how they wish, and this state has no interest in interfering with that,” he said. “But the state does not have an obligation to sanction every form of living arrangement that is demanding a sanction.”

Hawaii is likely to pass a same-sex marriage bill of its own this week. The state Senate cleared a measure on Oct. 30 that would legalize gay marriage in the 50th state, and lawmakers expect a vote from the House this week, according to The Washington Post.