The German parliament has paved the way for gay marriage there.
MPs in parliament voted to legalise the measure by 393 votes to 226.
Four MPs abstained from the vote on Friday morning.
German Chancellor Angela Merkel also voted against the change, saying marriage should be exclusively between a man and a woman.
But she says she hopes the change leads to more social peace.
Chancellor Merkel had withdrawn her objections to the measure earlier this week.
On Monday, Mrs Merkel suggested a vote in parliament could be a "question of conscience" for individual members - meaning MPs would no longer have to follow a party line.
Germany will join many western democracies in allowing same-sex couples the same legal rights as heterosexuals.
Until now, German same-sex couples were limited to civil unions.
Support for same-sex marriage in Germany is widespread.
A YouGov poll from May found 66% of favoured permitting same-sex marriage.
In the same poll, 57% of people said they were in favour of allowing adoption by gay couples.
As well as Ireland, countries such as France, Portugal, Spain and the UK allow same-sex marriage.
This meant Germany was one of the few Western European countries to have not introduced marriage equality.