German President Frank-Walter Steinmeier signed legislation on Thursday that will make same-sex marriage legal in the country by the fall of 2017, the Associated Press reported.

According to Steinmeier’s presidential office, the bill will come into effect on Oct. 1 at the earliest.

German lawmakers in parliament had previously approved the bill on June 30 after Chancellor Angela Merkel encouraged them to vote according to their consciences on the issue. Prior to that, Merkel and her party had waffled on the issue, declining to support same-sex marriage outright.

Although Germany has recognized civil partnerships since 2001, other European nations have far outpaced the country when it comes to full marital rights for same-sex couples, including the possibility of jointly adopting children.