That an openly gay politician can convincingly portray himself as more virtuous than a straight opponent attests to more than just the character of the current president. It shows how dramatically the country’s perception of homosexuality has changed.

For most of American history, gay people have been criminalized, pathologized, and religiously condemned; gay sexual expression was relegated to public parks, toilets, and bathhouses. Gay gathering places were routinely surveilled and raided by law enforcement; this June marks the 50th anniversary of the historic Stonewall uprising, when a group of patrons at a Greenwich Village gay bar fought back against police harassment. Even those who begrudgingly tolerated gays associated them with an inherent promiscuity unbefitting true and equal citizenship. (“Gay marriage will destroy the institution of homosexuality” went one joke.)

By embracing traditional family and sexual norms, a route made officially available to him by the Supreme Court’s 2015 Obergefell v. Hodges decision legalizing same-sex marriage, Buttigieg is radically upending popular expectations of what a gay politician can be. The South Bend, Indiana mayor has made much of the fact that he is the first Millennial to run for president. He is also the first post-Obergefell candidate.

As Buttigieg has remarked repeatedly on the campaign trail, an earlier version of his highly qualified self (Harvard graduate, Rhodes Scholar, military veteran) would never have had a shot at the presidency. For previous generations of gay politicians, sexual orientation imposed a ceiling on their career advancement. When Representative Barney Frank of Massachusetts came out of the closet to Speaker Tip O’Neill in 1986, the plain-speaking Boston pol replied, “I’m sorry to hear it. I thought you might become the first Jewish speaker.”

In his memoir Stranger Among Friends, the gay activist David Mixner described his decades-long friendship with Bill Clinton, whose life paralleled his own. “The President and I were born three days apart. We both dreamed of serving our country,” Mixner wrote. “There was one difference. He could pursue his dreams while I felt I could not. Bill Clinton was born straight and I was born gay.” For Sean Strub, a gay activist who eventually did make a failed run for Congress in 1990, it was the very act of gay sex that instilled a sense that public office would forever be off-limits. “When I started sleeping with men, one of the most sort of salient truths that I embraced about that was that I couldn’t run for office,” he recalled in an unpublished, 1994 interview with the late New York Times reporter Dudley Clendinen.

Until very recently, a cloud of scandal and questionable sexual ethics hovered over the gay male politician, a function of society’s illegalization and stigmatization of homosexuality. Gay men are hardly more predisposed to sexual impropriety than their hetero peers, but as long as same-sex desire was driven underground, it was all but inevitable that gay men’s political careers would lurch toward some form of humiliation.