German lawmakers voted to legalize same-sex marriage in their last session before the September election. Lawmakers voted 393 for legalizing “marriage for everybody,” and 226 against with four abstentions.

The measure brought to a vote in Friday’s session was fast-tracked after Chancellor Angela Merkel said Monday lawmakers could take up the issue as a “question of conscience,” freeing members of her conservative coalition, which has been against same-sex marriage, to individually vote for the measure.

Germany has allowed same-sex couples to enter civil partnerships since 2001, but same-sex marriages remained illegal.

All of Merkel’s potential coalition partners after the Sept. 4 election, including the center-left Social Democrats of her challenger, Martin Schulz, have been calling for same-sex marriage to be legalized.