German lawmakers voted Friday to legalize same-sex marriage after a short but emotional debate, bringing the country in line with many of its Western peers. Though Chancellor Angela Merkel voted against the measure, she paved the way for its passage by freeing other members of her party to vote their "conscience."

Lawmakers voted 393 for legalizing "marriage for everybody" and 226 against, with four abstentions.

Merkel said Monday that lawmakers could take up the issue as a "question of conscience," allowing members of her conservative coalition, which has been against same-sex marriage, to individually vote for it.

GAY PRIDE PARADES SOUND A NOTE OF RESISTANCE - AND FACE SOME

That prompted her center-left rivals to quickly call for a snap vote on the issue, adding it to the agenda Friday on parliament's last regular session before Sept. 24 elections.

While some in Merkel's conservative bloc spoke against the measure, Berlin Christian Democrat Jan-Marco Luczak urged his fellow party members to vote for same-sex marriage.

"It would be absurd to try and protect marriage by preventing people to marry," he told lawmakers.

Many applauded Merkel's comments that opened the way for the vote, but Social Democrat lawmaker Johannes Kahrs noted in the debate that the chancellor had been a longtime opponent of gay marriage.

"Many thanks for nothing," he said bluntly.

Germany has allowed same-sex couples to enter civil partnerships since 2001, but has not granted them full marital rights, which include the possibility to jointly adopt children.

The new law won't take effect for several months because it still needs to pass the upper house of Parliament and be approved by the president, though those are formalities. It is also expected to face legal challenges.

Merkel told reporters after the vote that her vote against the measure was based upon her reading of the country's law concerning marriage and that she did think gay couples should be able to adopt.

Germany's basic law is vague, saying only that "marriage and the family shall enjoy the protection of the state," but Merkel said that for her "marriage as defined by the law is the marriage of a man and a woman."

She added, however, that she stood by her contention that the interpretation was a "question of conscience" and urged all views to be respected.

"It was a long, intensive, and for many also emotional discussion, that goes for me personally too, and I'm hopeful not only that there will be respect for either side's opinions, but that it will also bring about more peace and cohesion in society," she said.

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

It is not clear whether Merkel thought her Monday comments would prompt such a quick vote, but many analysts have suggested that by opening the door to gay marriage the chancellor removed yet another issue that might have helped her opponents in their campaigns against her.

In nearly 12 years as chancellor, Merkel has moved her party to the center and away from conservative orthodoxy, speeding up Germany's exit from nuclear power and ending military conscription among other moves.