Maryland's House of Delegates on Friday approved by a razor-thin margin a measure that would allow same-sex couples to marry, putting it on the road to joining six other states where gay and lesbian nuptials are legal.

Prompting cheers from a packed chamber gallery in Annapolis, the Maryland vote came shortly after Republican New Jersey Gov. Chris Christie vetoed a similar bill. Christie accompanied his veto with a call for lawmakers in Trenton to appoint an advocate for same-sex couples under the state's existing civil-union law.

Despite Christie's veto, the Maryland action capped an historic week for gay-rights advocates with bills to legalize same-sex marriage passing legislatures in two states, and the governor of Washington signing into law a gay-marriage bill.

While still highly contentious, gay marriage has gained suprising momentum in the states ahead of November's presidential elections, with supporters framing it as a civil-rights issue and opponents saying marriage should be reserved for unions between a man and a woman.

In Maryland, state delegates voted 72 to 67 in favor of the Civil Marriage Protection Act after two hours of often-impassioned debate. The legislation goes next week to the state Senate, which last year approved a similar measure and is widely expected to do so again.

That would set the stage for the measure to be signed into law by Democratic Gov. Martin O'Malley, a gay-marriage supporter who lobbied fervently for the bill this week. One of his chief tasks was to sway black lawmakers, many of whom were hesitant to back an issue opposed by many of the state's black clergy.

At the Capitol on Friday, Baltimore residents Alli Harper, 33, and her partner Jenn Monti, 31, cheered the vote. They have been together for 12 years and held a religious ceremony exchanging vows in 2010.

We knew the vote was close, and we were nervous but hopeful, said Harper. We wanted to be here when this historic vote took place. Monti said they are going to get a license as soon as we can.

Supporters of the bill in the House of Delegates, the lower chamber of the Maryland General Assembly, turned back a handful of amendments offered by opponents to delay or derail it on Friday. They also managed to suspend a rule that usually bars final votes from taking place the same day as votes on proposed amendments.

A year ago, the same-sex marriage bill failed to win approval in Maryland's House of Delegates, but Friday's vote now sets the state on the path to join New York, Massachusetts, Connecticut, New Hampshire, Vermont, and Iowa, where gay weddings are legal.

In New Jersey, advocates appeared to face an uphill battle.

Christie, a supporter of Republican presidential hopeful Mitt Romney and often mentioned as a potential vice-presidential candidate, has called for voters to decide the issue. No U.S. state has ever approved same-sex marriage in a referendum.

Christie made no secret of his plans to veto the measure and followed through the day after it won full legislative approval. He asked lawmakers to quit pursuing gay-marriage legislation and instead create an ombudsman for civil unions of same-sex couples who would carry on New Jersey's strong tradition of tolerance and fairness.

Christie said in a statement: The ombudsman will be charged with increasing awareness of the law regarding civil unions, will provide a clear point of contact for those who have questions or concerns, and will be required to report any evidence of the law being violated. In this way, we can ensure equal treatment under the law.

Democrats do not appear to have enough votes to override a New Jersey veto with a two-thirds majority, although they have until the end of 2013 to try.

When we look back in the annals of history, unfortunately, the governor will see that he was on the wrong side of justice, Assembly Speaker Sheila Oliver, a Democrat, said in a statement. All the couples disappointed by his action today should take solace in the fact that we are not giving up this fight.

On Monday in Washington state, Gov. Christine Gregoire signed into law legislation legalizing same-sex marriage, but it will not take effect until at least June. Opponents are working to gather signatures for a ballot initiative in November that would block the legislation.

In California, a federal appeals court this month overturned that state's gay marriage ban, enacted through a 2008 ballot initiative. That sets up a possible showdown in the U.S. Supreme Court over the matter.

U.S. federal law defines marriage as between one man and one woman, but the administration of President Barack Obama has chosen not to defend the law in court.

(Additional reporting by Dave Warner; Writing by Paul Thomasch; Editing by Daniel Trotta, Dan Burns and Greg McCune)