The Illinois House of Representatives voted Tuesday to allow same-sex couples to wed, ending months of delay over the issue in the Capitol and clearing the way for Illinois to become the 15th state, along with the District of Columbia, to permit gay couples to marry.

The vote was 61 to 54, mostly along partisan lines, with only three Republicans voting yes.

“In Illinois, we tried civil unions and that separate status has time and time again proved to fall short,” said State Representative Greg Harris, a sponsor of the bill, urging his House colleagues to approve the measure on Tuesday.

The measure passed the Illinois Senate in February, but for procedural reasons it had to be voted on there again. On Tuesday, the Senate quickly approved changes the House made to the bill, sending it to the desk of Gov. Pat Quinn, a Democrat who has said he will sign it. Illinois couples could begin marrying on June 1.

The outcome itself was perhaps less surprising than how long and difficult the debate had proved in a state with both legislative chambers controlled by Democrats and where President Obama, once a member of the State Senate, specifically voiced his support this year. Illinois already permits civil unions for same-sex couples, but even as a wave of state legislatures passed marriage provisions this year, the issue had stalled.