Updated

Colorado lawmakers took a historic vote to approve civil unions for gay couples Tuesday, delivering on a campaign promise from Democrats who have capitalized on the changing political landscape of a state where voters banned same-sex marriage not long ago.

The bill on its way to the desk of Democratic Gov. John Hickenlooper is expected to be signed into law soon, capping a three-year fight over a proposal to grant gay couples rights similar to marriage.

Applause erupted in the Capitol as the bill won final passage on a 39-26 House vote, with two Republicans joining all Democrats to approve the measure. Several dozen people watching from the House gallery left smiling and hugging, and some wiped away tears of joy.

Once the measure is signed, Colorado will join a dozen other states that have civil unions or similar laws. Six states allow gay marriage.

"This is the best step toward equality Colorado could take right now. I'm thankful we got it done," said Katy Jensen, a 34-year-old Denver engineer who plans a civil union with her partner after the bill becomes law on May 1.

Last year, Democratic Sen. Jessie Ulibarri, a gay lawmaker serving his first term, was among those in the House gallery with his children, watching as Republicans used their one-vote majority in the House to prevent the measure from being debated in the waning hours of the session, thus killing the bill.

"I sat with my kids at midnight, wondering what was going to happen the next time we had a tragedy. What would happen if I had to take my kids to the ER and then I was questioned whether or not I was really their dad," said Ulibarri, one of eight gay Democratic lawmakers serving in the Colorado Legislature.

Civil unions for gay couples became a rallying cry for Democrats who took control of the Colorado House in last year's elections, and they vowed an early vote on the proposal.

"Elections have consequences," said Republican Rep. Frank McNulty, the former House speaker.

Democrats now control both chambers of the Legislature, and the party elected Colorado's first gay House speaker, Mark Ferrandino.

"The people spoke in November, and we are fulfilling a promise we made at the end of last session," Ferrandino said Tuesday.

The vote marks a dramatic political shift in Colorado, a western state with deep conservative roots that has become more moderate over the past decade. In 1992, Colorado voters approved a ban on municipal antidiscrimination laws to protect gays. Four years later, the U.S. Supreme Court said the law, known as Amendment 2, was unconstitutional, but not before some branded Colorado a "hate state."

And in 2006, voters approved a gay-marriage ban -- meaning civil unions are the only option for gay couples in the state for now. That could change with a U.S. Supreme Court ruling on gay marriage bans in the coming months.

"We truly do stand on the edge of history. For some in this chamber, this is the reason that we are here, at this time, and in this place," said Democratic Rep. Pete Lee. He called the vote a time for redemption.

"We vote today to redeem our friends, our aunts, our uncles, our brothers, our sisters, our children, and I daresay, our colleagues, from the scourge of discrimination and inequality," he said.

Colorado's measure grants gay couples rights similar to marriage, including enhanced inheritance and parental rights. People in civil unions also would have the ability to make medical decisions for their partners.

Republicans opposed the bill, saying they would've liked to see religious exemptions to provide legal protections for those opposed to civil unions.

"I have long-standing concerns about the way in which religion isn't tolerated by some down here at the state Capitol," McNulty said. "I continue to have those concerns."

Democrats contend the Republican suggestions to amend the bill would have opened the door to discrimination. Under the bill, churches are not required to perform civil unions, but Republicans wanted broader protections to include businesses and adoption agencies.

Republicans also argued civil unions were too similar to marriage, and that they would undermine the institution of marriage.

"Civil unions are not marriage. They are something that are separate, and distinct, and lesser, and unequal," Democratic Sen. Pat Steadman said. "And that really is not good enough. We passed this bill because this is the best we can do."

When asked, five of the eight gay Democratic lawmakers said after the vote that they would get civil unions. It was a difficult question for Steadman, whose longtime partner, Dave Misner, died of cancer last year.

"Some of us don't get that opportunity," Steadman said.