WELLINGTON, New Zealand -- Hundreds of jubilant gay-rights advocates celebrated at New Zealand's Parliament on Wednesday as the country became the 13th in the world and the first in the Asia-Pacific region to legalize same-sex marriage.

Lawmakers voted 77 to 44 in favour of the gay-marriage bill on its third and final reading.

People watching from the public gallery and some lawmakers immediately broke into song after the result was announced, singing the New Zealand love song "Pokarekare Ana" in the indigenous Maori language.

"For us, we can now feel equal to everyone else," said Tania Penafiel Bermudez, a bank teller who said she already considers herself married to partner Sonja Fry but now can get a certificate to prove it. "This means we can feel safe and fair and right in calling each other wife and wife."

In one of several speeches that ended in a standing ovation, bill sponsor Louisa Wall told lawmakers the change was "our road toward healing."

"In our society, the meaning of marriage is universal -- it's a declaration of love and commitment to a special person," she said. She added that "nothing could make me more proud to be a New Zealander than passing this bill."

Lawmakers from most political parties were encouraged by their leaders to vote as their conscience dictated rather than along party lines. Although Wall is from the opposition Labour Party, the bill also was supported by centre-right Prime Minister John Key.

"In my view, marriage is a very personal thing between two individuals," Key said. "And, in the end, this is part of equality in modern-day New Zealand."

Since 2005, New Zealand has allowed civil unions, which confer many legal rights to gay couples. The new law will allow gay couples to jointly adopt children for the first time and will also allow their marriages to be recognized in other countries. The law will take effect in late August.

"This is really, really huge," said Jills Angus Burney, a lawyer who drove about 90 minutes to Parliament to watch the vote with her partner, Deborah Hambly, who had flown in from farther afield. "It's really important to me. It's just unbelievable."

Burney, a Presbyterian, said she and Hambly want to celebrate with a big, traditional wedding as soon as possible.

The change in New Zealand could put pressure on some of its neighbours to consider changing their laws. In Australia, there has been little political momentum for a change at a federal level and Prime Minister Julia Gillard has expressed her opposition to same-sex marriage. Some Australian states, however, are considering gay-marriage legislation.

Rodney Croome, the national director for the lobbying group Australian Marriage Equality, said that since Friday, 1,000 people had signed an online survey saying they would travel to New Zealand to wed, though same-sex marriages would not be recognized under current Australian law.

"There's this really big, pent-up demand for this in Australia," Croome said. "New Zealand is just a three-hour plane ride away, and many couples are going to go to New Zealand to marry. They are just so sick and tired of waiting for the government to act. I think it's going to spark this big tourism boom."

Many people in New Zealand remain vehemently opposed to gay marriage. The lobbying group Family First last year presented a petition to Parliament signed by 50,000 people who opposed the bill. Another 25,000 people have since added their signatures to that petition.

"Historically and culturally, marriage is about man and a woman, and it shouldn't be touched," said Family First founder Bob McCoskrie. "It doesn't need to be."

McCoskrie said same-sex marriage should have been put to a public referendum rather than a parliamentary vote. That might not have changed the outcome, however: Surveys indicate that about two-thirds of New Zealanders favour gay marriage.

The change was given impetus last May when U.S. President Barack Obama declared his support for gay marriage. That prompted Prime Minister Key to break his silence on the issue by saying he was "not personally opposed" to the idea. Wall then put forward the bill, which she had previously drafted.

Same-sex marriage is recognized in the Netherlands, Belgium, Spain, Canada, South Africa, Norway, Sweden, Portugal, Iceland, Argentina and Denmark. Lawmakers in Uruguay approved a law last week that President Jose Mujica is expected to sign. Nine states in the U.S. also recognize such marriages, but the federal government does not.

In his speech before Wednesday's vote, lawmaker Tau Henare extended a greeting to people of all sexual identities and concluded with a traditional greeting in his indigenous Maori.

"My message to you all is, 'Welcome to the mainstream,"' Henare said. "Do well. Kia Ora."