The Slovenian National Assembly on Tuesday approved a gay marriage bill.

Lawmakers voted 51-28 in favor of changes to the family law allowing gay couples to marry and adopt children.

Gay couples could previously enter a registered partnership, which offers few benefits. In 2011, lawmakers expanded partnerships to include all the rights, benefits and obligations of marriage except joint adoption. However, voters rejected the law during a national referendum.

The National Council now has 7 days to decide whether to require lawmakers to hold a second vote.

“We commend the elected representatives of Slovenia for passing such historic legislation ensuring the nation’s LGBT citizens receive the rights they deserve, and we congratulate the LGBT activists and advocates who helped make this momentous day possible,” Ty Cobb, director of HRC Global, said in a statement.

Under the theme “Children Are At Stake,” a few thousand people rallied Tuesday against passage of the bill and vowed to force a referendum on the issue.

According to a Delo Stik poll conducted last month, 59 percent of Slovenians support marriage equality, while 37 percent remain opposed.