A bill which would make New Zealand the twelfth nation to legalize gay marriage has been given initial approval by lawmakers.

The bill received overwhelming support in the second of three votes needed for approval. Wednesday's 77-44 vote was considered its most crucial. The final vote is considered little more than a formality and could be taken as early as next month, the AP reported.

Hundreds looked on in the Parliament's public gallery as lawmakers debated the bill.

“I'm very excited, as excited as the young people,” said Louisa Wall, the bill's sponsor, referring to the crowd of mostly young people, estimated at over 200. “It's a fantastic result.”

Wall, an openly gay member of the Labour Party, has previously said U.S. President Barack Obama's endorsement of marriage equality gave momentum to the bill.

“Marriage belongs to society as a whole, and that requires the involvement of the whole of society,” Wall told colleagues on Wednesday. “The role of the state in marriage is to issue a license to two people who love each other and want to commit to one another formally. That's what this bill does.”

New Zealand currently recognizes gay and lesbian couples with civil unions.