Karl Kreile, left, and Bodo Mende kiss after their marriage in Berlin (AP)

Germany has celebrated its first same-sex weddings after a new law came into force putting gay and lesbian couples on an equal legal footing with heterosexual couples.

Town halls in Berlin, Hamburg and elsewhere opened their doors to mark the event, made possible by a surprise vote in Parliament three months earlier.

"We're making a single exception to fire a symbolic starter pistol because same-sex marriages are possible from today," said Gordon Holland, a registrar in Berlin's Schoeneberg district.

Mr Holland said it was appropriate for Schoeneberg to hold the first same-sex wedding in the country because it has long been a centre of gay life in the German capital.

About 60 guests and an equal number of journalists packed into Schoeneberg town hall's "Golden Room" to witness the marriage of Karl Kreile and his partner of 38 years, Bodo Mende.

The grooms entered the room to the popular Wedding March by 19th-century German composer Felix Mendelssohn, before saying their vows and signing the marriage documents to applause and cheers from the assembled guests.

Mr Kreile, 59, said it was an "incredible honour" to be the first same-sex couple to marry in Germany, noting that he and Mr Mende, 60, had been campaigning for gay rights for decades.

After cutting the wedding cake - featuring a rainbow flag and the words "marriage for all" - the couple planned to hold a small reception and fly to Vienna later in the week for a five-day honeymoon.

"We had a huge party 15 years ago that can't be topped," said Mr Kreile, referring to the celebration after the couple registered their partnership in 2002.

Germany introduced registered partnerships in 2002, but those gave same-sex couples fewer rights than heterosexual couples who married.

Chancellor Angela Merkel long opposed same-sex marriages, only agreeing to a free vote in Parliament on the matter in June, shortly before national elections.

The bill, which enjoyed strong public support, passed by a wide margin, with 393 lawmakers voting in favour of marriage equality and 226, including Ms Merkel, voting against.

"This day sends a significant signal, which is that the state's discrimination of lesbians and gays is finished," said Joerg Steinert, who heads the Berlin branch of Germany's lesbian and gay association. "This was long overdue in Germany and so this is a day of great joy."

According to official figures there were about 43,000 registered partnerships in Germany in 2015, most of which are expected to be converted into marriages in the coming months.

AP

PA Media