Fierce legal battles lie ahead for legislation allowing same-sex marriage in Maryland, even as advocates and critics agree that the measure is probably headed to the November ballot.

The Maryland House of Delegates passed the bill 72-67, a long-awaited victory for gay-marriage advocates who saw a similar bill die on the House floor a year ago. If passed by the Senate, which approved the measure last year, Gov. Martin O'Malley could sign the bill by the end of the week.

However, any legislation approved by the General Assembly can be challenged and placed on the November ballot if a successful petition can be mounted against it. Del. Neil Parrot, R-Washington County, said he would lead petition drives to challenge the bill.

Gay-marriage advocates may try to stop a petition drive using a constitutional challenge, according to Del. Aisha Braveboy, D-Prince George's, or questions could be raised about the validity of signatures.

Advocates have few other options -- only bills concerning liquor or appropriations are exempt from a referendum challenge, according to the state Board of Elections.

But gay-marriage opponents will have their struggles as well in a state evenly split on the issue, according to a January poll conducted by Gonzales Research and Marketing Strategies -- 48.8 percent of Maryland residents favor marriage for same-sex couples, while 47 percent are opposed.

"It'll be hard for both sides, quite frankly," Braveboy said. "But certainly those who are challenging it are going to have to jump through a lot of hurdles. At the end of the day, there are many people on both sides of this issue in Maryland."

The bill throws Maryland's debate into the national spotlight among states such as Washington, which recently passed same-sex marriage legislation that faces a referendum challege, and New Jersey, where Republican Gov. Chris Christie vetoed a same-sex marriage bill last week.

Maryland voters could face three decisions on the November ballot: same-sex marriage, the Dream Act letting some illegal immigrants pay in-state college tuition rates, and an expansion of gambling in Maryland.