City lawmakers voted this afternoon to legalize same-sex marriages, making the District of Columbia the fifth jurisdiction in the country to have its elected legislature pass such a measure.

“Today is the final step in a long march toward equality in the District of Columbia,” said At-Large Councilmember Phil Mendelson, who shepherded the bill through the D.C. Council.

The council now will present the bill for Mayor Adrian M. Fenty‘s signature, which is likely to come Thursday. Once the bill is signed, it will be transmitted to Congress, where it will await the end of a 30-legislative-day review period.

The 11-2 final vote brings to a close a legislative process whose outcome has never been in doubt. Prior to the marriage bill’s introduction in September, gay-marriage proponents had secured the support of a supermajority of councilmembers and, in a test vote of sorts, passed a measure recognizing same-sex marriages from other states and countries. More than that, the vote—-supported by all except Ward 7 Councilmember Yvette M. Alexander and Ward 8 Councilmember Marion Barry—-is the result of decades of work by the District’s gay community in amassing and wielding political power, electing supportive officials who have over the course of nearly two decades, systematically dismantled the mechanics of discrimination against gays and lesbians here in Washington. And the timing of today’s vote is a strategic one, set to avoid to the greatest degree meddling from Capitol Hill and other forces.

Despite the foregone conclusion, dozens on both sides of the debate gather at the John A. Wilson Building to witness the vote—-not to mention lots of cameras and unfamiliar reporters. Bishop Harry Jackson and other clergy who opposed the measure were sitting in the front row in the council chambers, but many more seats were filled by supporters of the council’s action today.

Over 40 minutes of discussion ahead of the vote, each of the council’s 13 members spoke. Most thanked At-Large Councilmember David A. Catania, the author and prime mover behind the bill. Ward 6 Councilmember Tommy Wells issued a warning: “There will be attacks, there will be an effort to undo this….I know that we will fight back.” Barry and Alexander both declared their support for the gay community on other issues.

The D.C. Council follows the legislatures of California, Maine, New Hampshire, Vermont, and Connecticut in passing same-sex marriage legislation. Only the laws in Maine, New Hampshire, and Connecticut now stand, and Connecticut’s lawmakers only voted through the measure after its Supreme Court ruled that it must. (California passed gay marriage measures in 2005 and 2007, only to have them vetoed by Gov. Arnold Schwarzenegger; Maine had its gay marriage law overturned by a referendum last month.)

Overturning the measure during 30-day congressional review period would require majority votes from both houses of Congress, plus the signature of President Barack Obama. That outcome is unlikely. A congressional challenge to the District’s vote is more likely through other avenues: First off, lawmakers could place a restriction on the city’s spending that would effectively nullify the law, but the earliest that would happen is approximately a year from now. Alternately, a gay-marriage rider could be added to any other congressional provision—-much as restrictions on city gun laws were added to the bill that would have granted the District a vote in the House of Representatives.

More immediately threatening may be the prospect of judicial intervention. Lawyers financed by national conservative organizations have vowed to challenge the gay marriage measure on a variety of grounds, including whether the District’s home rule charter requires elections officials to allow a public vote on the issue and also whether the federal Defense of Marriage Act applied to local laws in the District of Columbia.

But today’s victory will be sweet nonetheless to marriage supporters. A celebratory gathering is scheduled for tonight at the Long View Gallery in Shaw, starting at 7:30. And LL has learned that a signing ceremony is in the works, which would mark the first time in many, many months that Fenty has stood with councilmembers to finalize a piece of legislation. That event is expected to happen Thursday.

UPDATE, 3:20 P.M.: LL mistakenly reported that if Fenty and councilmembers gather for a signing ceremony, that would mark the first time such an event had happened. Not true: There’s at least two occasions where Fenty has held a public bill-signing, with council participation: The mayoral school takeover in April 2007, and a Darfur divestment measure passed in November 2007.