John Locher / AP

A bitter irony underlies Kamala Harris’s exit from the presidential campaign. She lost, in part, because she couldn’t forthrightly defend her record as a prosecutor. She couldn’t forthrightly defend that record because party activists deemed it insufficiently progressive. They portrayed her as complicit in the unjust incarceration and killing of black and Latino men.

Yet had Harris—especially as a black woman—been the crusading criminal-justice reformer that Democrats now want to see, she would likely never have been in a position to run for president in the first place. What doomed Harris wasn’t just the Democratic Party’s leftward shift on racial and criminal-justice issues. It was the party’s lack of sympathy for the very different political environment Harris faced just a few years ago, when women and black candidates faced intense pressure to show that they were tough on crime.

This is among the strangest twists of the 2020 presidential campaign. For good reason, Democrats have grown less tolerant of racism in the criminal-justice system. Yet that very intolerance—combined with insufficient recognition of the particular burdens that black women candidates face—has helped push the only black woman running for president from the race.

Commentators have often compared Harris to Barack Obama, another African American senator who ran for president. But the two took very different paths to the national stage. Obama spent eight years in the Illinois state Senate, which offered him experience on a range of issues. Harris, by contrast, served as San Francisco’s district attorney and California’s attorney general. Before entering the Senate less than three years ago, she had focused overwhelmingly on criminal justice.

The narrowness of Harris’s professional background became painfully apparent when she struggled to articulate a coherent position on health care. But even more costly was her inability to lean into the one subject on which she did have a deep experience—fighting crime—because doing so risked enraging progressives. Four days before Harris announced her campaign, a New York Times op-ed declared that, rather than being the kind of “progressive prosecutor” that progressives admire, she “was often on the wrong side of history when she served as California’s attorney general.” Three days before she announced, a CNN headline declared, “Kamala Harris Takes Hits on Her Criminal Justice Record.” The day she announced, a Vox headline observed that “Kamala Harris Has Been Criticized for Her Criminal Justice Record. She’s Just Begun to Offer a Response.” A week later, CNN’s Jake Tapper challenged her to explain why she “opposed legislation that would have required your office to investigate fatal shootings involving police officers.” Three days after that, The Intercept asked: “Kamala Harris Wants to Be President. But What About Her Right-Wing Past?”

The onslaught left the Harris campaign divided and defensive on what should have been its signature issue. As Jonathan Martin, Astead W. Herndon, and Alexander Burns recently reported in The New York Times, Kamala Harris’s sister and top adviser, Maya Harris, spent the spring “at war” with Harris’s political consultants “over whether the senator should embrace or downplay her record as a prosecutor.” According to aides, Kamala Harris herself “was knocked off kilter by criticism from progressives and spent months torn between embracing her prosecutor record and acknowledging some faults.” In April, she apologized for anti-truancy policies that she once championed.

Journalists chronicled Harris’s struggle to balance her tough-on-crime record with progressive demands. And as Harris fell in the polls, they speculated that she was losing liberal voters to Elizabeth Warren, who appeared more ideologically pure. What they didn’t do nearly enough was ask whether Harris, as a black woman, could have adopted nonpunitive crime policies 10 or 15 years ago and become a city district attorney and state attorney general in the first place.

Even for white men, being “soft on crime” was perilous in the early years of the 21st century. In 2004, Harris’s first year as San Francisco’s district attorney, John Kerry—a long-standing opponent of the death penalty—made an exception for cases of terrorism. This didn’t stop John Edwards from pummeling him—in the Democratic primary—for not supporting capital punishment in other cases as well. Politically, Edwards was on solid ground. Polling that year showed that more than two-thirds of Americans, and almost 60 percent of Democrats, backed the death penalty for murderers.

Perceived softness on crime was particularly perilous for black politicians, who, research suggests, pay a price with voters when they call out racism. In a debate during his 2004 campaign for the U.S. Senate, Obama boasted that in the state Senate he had “passed 150 pieces of legislation that toughened penalties for violent criminals.” In his 2006 book, The Audacity of Hope, he declared his support for the death penalty in cases of mass murder and the murder of children. Perceived softness on crime posed an even greater problem for black women candidates because, as a 2006 study by scholars at Rutgers University and the University of Wisconsin at Milwaukee pointed out, women politicians were perceived as less capable of addressing crime than their male counterparts.

Harris’s own early career illustrates the peril. In 2004, when she refused to seek the death penalty for a man accused of killing a police officer, her fellow San Francisco Democrat, U.S. Senator Dianne Feinstein, denounced the decision. The head of San Francisco’s police union said, “Our members never forgave Harris.”

As San Francisco district attorney, Harris was hardly soft on crime. In her 2009 book, Smart on Crime, she boasted, “We are sending three times as many offenders to state prison than we were in 2001, three years before I took office. We also increased conviction rates for drug sellers.” Still, when she ran for state attorney general in 2010, her death-penalty decision six years earlier almost cost her the election. Every other California Democrat running statewide that year won by double digits. Harris, running against a Republican who enjoyed overwhelming support from police groups and attacked her relentlessly for opposing capital punishment, won by less than 1 percentage point in what the Los Angeles Times called “one of the closest statewide elections in California history.”

Given that near-death political experience, it’s hardly surprising that Harris, as California attorney general, avoided contentious battles with the police over sentencing reform and even appealed a judge’s decision that ruled California’s death penalty unconstitutional. It worked. In 2014, she garnered the endorsements of almost 50 law-enforcement groups and won reelection by more than 13 points.

Harris can still, of course, be faulted for policies that caused harm. She can even be faulted for not recognizing quickly enough that the politics of crime had changed, and that she had more flexibility—if indeed she wanted it—to adopt the less punitive policies that most Democrats now embrace. But when chronicling her past sins against today’s standards, more pundits and party activists might have paused to ask whether Harris’s race and gender made progressive purity harder for her to attain than it is for, say, Bernie Sanders. They might also have asked why, despite Joe Biden’s ideological transgressions on matters of race and crime—which dwarf Harris’s—he’s not only still in the campaign, but the closest thing it has to a front-runner.

We want to hear what you think about this article. Submit a letter to the editor or write to letters@theatlantic.com.