Andrew Cuomo didn’t need to do much to discredit Cynthia Nixon as a gubernatorial candidate. As soon as the actress and activist announced she was challenging the Democratic governor in March, social media feeds filled with jokes about the bawdy exploits of the lawyer Nixon played on Sex and the City. It was an obvious comparison: Miranda Hobbes was easy to imagine in public office, and it’s by far Nixon’s most-famous role. But mostly, the Miranda fixation, even when seemingly supportive outlets gave in to it, amounted to a collective eye-roll.

It is a testament to both Cuomo’s inadequacy and Nixon’s history of activism in New York politics that she gathered credibility as the campaign went on. She put Cuomo on the defensive in their only debate, prompting his campaign to smear her as too “angry” to govern, and she pushed the governor to the left on multiple fronts. Though Nixon lost big on Thursday night, she proved she wasn’t the dilettante that Cuomo supporter Christine Quinn made her out to be when she called Nixon’s run a “flight of fancy.” In the process, Nixon became a model for what a celebrity candidate should aspire to be.

Celebrity can be a self-defeating force in politics. On one hand, Nixon’s fame helped garner her candidacy more press than Cuomo’s challenger Zephyr Teachout received in 2014. Forty minutes after releasing her campaign announcement video, Nixon’s name was the No. 1 trending topic on Twitter nationwide. By that evening, the video had more than 1 million views on Twitter. At the same time, Nixon’s celebrity disqualified her in the minds of some voters, who saw her run for office as an ego-driven exercise undertaken by a political neophyte.

Camp Cuomo worked incredibly hard to emphasize Nixon’s Hollywood credentials and downplay her other qualifications, treating her as a silly, uninvited party crasher. A Cuomo pollster greeted Nixon’s entrance into the race by claiming that, in the age of Trump, Democrats are wary of celebrity leaders and “the chaos of the inexperienced.” Quinn noted that “being an actress and celebrity doesn’t make you qualified for public office,” before bestowing Nixon with a label that will live on as the top queer Halloween costume of 2018: “unqualified lesbian.” In their August debate, Cuomo himself accused Nixon of living “in the world of fiction,” as opposed to his own “world of fact.” He would have voters believe that Nixon imagined governing the New York of Sex and the City, a world in which the MTA she accused him of mismanaging still had its buses plastered with ads for Carrie Bradshaw’s dating column.

Nixon worked to counter that impression in that first campaign video, which included footage from speeches she’s given at all manner of rallies. Her changing hairstyles mark the passage of time; it’s clear that some clips are quite dated, attesting to her long-standing activism. Over the next few months, she fought back against the notion her critics sighed about when she entered the race—here’s another celebrity convinced she can do politics better than a politician—and ran her campaign on the premise that, indeed, she could. Her strategy seemed to rest on reversing voters’ typical definitions of celebrity and politician. (One is greedy, smug, image-obsessed, rude to employees, and clueless or careless about regular people’s lives; the other is a committed public advocate with a humble past.) She hit Cuomo hard on his administration’s history of corruption, arguing that the audacity of a celebrity who thinks she can govern better than a legacy politician beats the cynicism of a legacy politician who’s already doing the job.

But the advantages of celebrity connections and name recognition only go so far when it comes to unseating a powerful incumbent. The high-profile donations Nixon drew from famous people all over the country, including Lena Dunham, Rosie O’Donnell, Alec Baldwin, and Susan Sarandon, didn’t make a dent in Cuomo’s giant war chest. The thoroughly Instagrammed and star-studded events Nixon hosted in New York City probably didn’t reach, or only served to alienate, the upstate and low-income residents she championed in her speeches. Even Amy Schumer, who donated $10,000 to Nixon’s campaign relatively late in the game, endorsed Cuomo because she didn’t think Nixon would “be able to pressure the state legislature in stuff” or even “know what the heck to do.” (At the last minute, Schumer reversed herself and decided to vote for Nixon.)

Nixon and other Democratic candidates in the Trump era have helped start an important conversation among party leaders and voters about how much experience it takes to be a political leader. Alexandria Ocasio-Cortez, who will almost certainly represent the Bronx and Queens in the House come January, ousted a 10-term congressman in her primary race. She has never held elected office but, like Nixon, has a history of political activism. Ocasio-Cortez won on the strength of her ideas, her excellent grass-roots organizing, and a background that closely aligns with those of her future constituents. Ayanna Pressley performed a similar feat in Massachusetts earlier this month. She has several years of experience on the Boston City Council, but her primary win over a progressive 10-term congressman was largely based on personality and lived experience, not political positions. In both Pressley’s and Ocasio-Cortez’s races, a white man’s two decades of experience in office was a shortcoming, not a selling point. Those who consider Cuomo a corrupt, unprincipled machine politician might have made a similar case for Nixon.

There is a case to be made that a celebrity candidate, even one with a history of political advocacy, should launch her political career by pursuing a smaller-scale position. You could also argue that celebrities should eschew political candidacy entirely in favor of throwing their cultural and financial weight behind people with more experience and lives that mirror the average voter’s. But if Nixon’s goal was to make a difference in the Democratic Party, not just in New York, she undoubtedly succeeded—because of her celebrity, not despite it. Nixon focused the entire country’s eyes on a gubernatorial election whose results have never seemed like anything but a foregone conclusion. She encouraged New York voters and a significant number of outsiders to think about what the Democratic Party should stand for and be willing to settle for. Cuomo has long been floated as a possible 2020 presidential candidate; the reckoning that Nixon forced this year could help the party choose a better nominee when the primaries roll around. Thanks to Nixon’s star power, his shortcomings are now national news.