DENVER -- Democratic lawmakers in Colorado sustained a wrenching defeat in the final days of the legislative session last spring. A bill that would have allowed civil unions for same-sex couples was blocked from getting a full vote in the State House of Representatives by Republican leaders, who knew Democrats had the votes to pass it.
But this week, Democrats here regained control of the House, buttressed by a favorably redrawn legislative map and simmering anger over the civil unions debate.
And on Thursday, punctuating the moment, Democratic lawmakers elected the state's first openly gay speaker of the House.
The new speaker, State Representative Mark Ferrandino, a Democrat from Denver, was a co-sponsor of the civil unions bill and has vowed to bring it back when the session resumes in January.
"Twenty years ago, Amendment 2 passed in Colorado," an emotional Mr. Ferrandino said after his election, referring to a 1992 state constitutional amendment passed by voters that banned laws protecting gay men and lesbians from discrimination. "And now we have our first openly gay speaker. I think that is an amazing turnaround for our state. It speaks volumes for how much we've grown."
Amendment 2, which led some to call Colorado "the hate state," was ultimately ruled unconstitutional by the United States Supreme Court. A separate 2006 amendment to the state Constitution defined marriage as being only between a man and a woman.
Mr. Ferrandino said that the economy and education were legislative priorities, but that in terms of expanding rights for gay men and lesbians, "civil unions is the thing we really are pushing for."
California and Rhode Island have openly gay House speakers, according to the Gay and Lesbian Victory Fund, which supports gay candidates. And a lesbian lawmaker will most likely become speaker in Oregon, said Denis Dison, a spokesman for the group.
Over the past two years, Republicans have controlled Colorado's House of Representatives by a single vote, forcing Democrats to seek their support on contentious legislation like on civil unions.
This year, even a special legislative session called by Gov. John W. Hickenlooper, a Democrat, in a last-ditch effort to pass civil unions could not resolve the heated impasse over the issue.
But Democrats now have a 37-to-28 majority in Colorado's House and outnumber Republicans, 20 to 15, in the Senate.
Colorado, which is split among Democrats, Republicans and unaffiliated voters, also supported President Obama for a second time on Tuesday.
And despite its reputation as a swing state, Colorado has been trending toward the Democrats in recent years, nudged by a growing number of Latinos, who now make up 20 percent of the state's population and who supported Mr. Obama in overwhelming numbers, according to exit polls.
"I give the Obama machine a great deal of credit," said State Representative Frank McNulty, a Republican from Highlands Ranch and the departing House speaker. "They were devastatingly efficient."
Mr. McNulty, who was instrumental in blocking the civil union vote in May, said Democrats had successfully been identifying like-minded voters for the last six years.
"What they have is a machine," he said.
With their newfound power, Democrats also believe they can pass another prized piece of legislation, one that would allow state colleges and universities to offer discounted tuition to illegal immigrants.
Colorado lawmakers and immigrant rights advocates have tried to pass such legislation in recent years without success.
This article originally appeared in The New York Times.