The midterm election results pouring in on Tuesday night included a number of significant demographic milestones.

Sharice Davids and Deb Haaland will be the first Native American women to serve in Congress. Capitol Hill will have its first Muslim congresswomen with Rashida Tlaib and Ilhan Omar. And Rep. Jared Polis (D-Colo.) will be the first openly gay person elected to serve as a state’s governor.

Polis, an entrepreneur and five-term member of Congress from Boulder, beat Republican Walker Stapleton by six points in Colorado’s gubernatorial contest. But Polis’s splash into the history books is all the more significant considering the ugly track record of the state he has been elected to run.

Since the early 1990s, Colorado has played a key role in the battle for LGBT rights. The state was dubbed the “hate state” because of a 1992 law that sparked international backlash and boycotts. But the same legislation teed up a landmark 1996 U.S. Supreme Court decision that helped lay the groundwork for marriage equality.

“It’s a historic win — not just for the LGBT community but for the state of Colorado,” Annise Parker, president and CEO of the Victory Fund, a nonprofit group supporting LGBT politicians, told the Denver Post on Tuesday. “The fact that the state of Colorado, in 25 years, has gone from being dubbed the ‘hate state’ to a place that can elect someone who is not just openly gay, but publicly gay, that’s historic.”

Polis has been open about his sexuality since arriving in Congress in January 2009. His mother and father founded a greeting card company that later sold for hundreds of millions of dollars, according to the Denver Post. One of the wealthiest members of the House, with a reported estimated wealth of $387 million, Polis earned a reputation in Washington as a tech-savvy public education advocate.

Polis has two children with his longtime partner, and he has never downplayed his orientation on the campaign trail — a sign of the shifting public perception in a state that has tossed off its Old West past in favor of a progressive identity.

“Colorado is a state that values diversity,” he explained to the Denver Post before the midterm elections. “We’re willing to elect people that are going to do a good job for our state regardless of their background. . . . I think it’s exciting to show how far the LGBT community has come that it doesn’t stand in the way of being elected to the highest office in the state.”

Colorado’s ignominious “hate state” nickname starts with a fiery Colorado Springs car salesman named Will Perkins. Reacting to city ordinances banning discrimination on the basis of sexual orientation, Perkins and a group of evangelical Christians formed Colorado for Family Values in 1991.

“Too many people have bought into the idea that homosexuality, as they call it, is genetic, that there isn’t anything they can do about it,” Perkins once told a group of followers, according to Denver’s Westword. “I’m here to tell you that there are only two flavors of mankind: male and female. There is no such thing as a homosexual.”

To combat the legal protections, Perkins and his group launched a ballot initiative called Amendment 2. The referendum claimed anti-discrimination laws granted “special rights” to gays and lesbians, and aimed to ban such legal protections.

“They were talking about not wanting to give gay people special rights, but they were doing it by basically taking away rights,” University of Denver professor Kris McDaniel-Miccio recalled to Westword in 2017. “Everybody held their breath wondering if this was going to catch fire in other states, as well as Colorado.”

On Nov. 3, 1992, Colorado passed Amendment 2 by 53 percent. An immediate outcry followed from civil rights groups and activists. Celebrities such as Barbra Streisand spoke out against the amendment, according to Westword. In Colorado, business owners outraged over the law called for a boycott of their own state.

“We have called for a global boycott,” one Denver businesswoman told the Christian Science Monitor in 1992. “Don’t come here for recreation. Don’t come here for business. The governor and the people need to realize that basic civil rights are fundamental. Creating change through a boycott is only one means of demonstrating the power of the people.”

According to the Monitor, a month after Amendment 2 was passed, the number of canceled conventions in Denver alone because of the boycott totaled more than $6 million.

Eventually a lawsuit was filed against the amendment on behalf of a gay man named Richard G. Evans who worked for the Denver mayor. As the case — Romer v. Evans — crawled up the federal court system to the Supreme Court, observers from across the country tuned in because similar proposals were on deck in other states.

“It was a political issue, in that Amendment 2 was being cloned, so all eyes were on the results of the Supreme Court,” Mary Celeste, a lawyer who worked on the case, explained to KUNC radio in 2016. “If we lost there, then these initiatives would come forward across the country.”

In May 1996, the Supreme Court ruled that Colorado’s law was unconstitutional by a 6-to-3 majority. Writing for the majority, Justice Anthony M. Kennedy touched on themes that would turn up decades later in his famous Obergefell v. Hodges opinion, the case legalizing same-sex marriage.

Regarding Amendment 2, Kennedy wrote that the law “is at once too narrow and too broad. It identifies persons by a single trait and then denies them protection across the board. The resulting disqualification of a class of persons from the right to seek specific protection from the law is unprecedented in our jurisprudence.”

Despite the eventual implosion of the 1992 amendment, Colorado has also played a more recent part in the struggle for equality.

In 2012, a cake shop owner in Lakewood, Colo., refused to serve a gay couple on religious grounds. The resulting Supreme Court decision — Masterpiece Cakeshop, Ltd. v. Colorado Civil Rights Commission — sided with the business.

Many legal observes watching the 2017 case picked up echoes of the state’s earlier gay rights court battle.

“What I find really fascinating about Amendment 2,” McDaniel-Miccio told Westword, “is that we’re reliving it again in 2017.”