SAN FRANCISCO — Kamala Harris was three months into her tenure as San Francisco district attorney in 2004 when a gang member killed a police officer with a hail of bullets from an AK-47. Her announcement within three days of the murder that she would not seek the death penalty set off protests from her fellow Democrats as well as from the police.

Senator Dianne Feinstein stood in front of thousands of mourners at the officer’s funeral at St. Mary’s Cathedral and urged her to change her mind; Jerry Brown, the once and future governor, was among those standing in ovation. The state attorney general threatened to take over the case, and Senator Barbara Boxer asked the Justice Department to prosecute it.

Ms. Harris, the first person of color elected as this city’s district attorney, declared her decision a matter of principle: The death penalty, she believed, discriminated against poor and black people and would not deter more killing.

But death penalty opponents wondered a decade later where that principle had gone when as California’s attorney general Ms. Harris appealed a judge’s decision declaring the state’s death penalty law unconstitutional. She said it was a matter of upholding the law; her critics asked whether she would have similarly defended segregation and statutes against interracial marriage.

Image

As San Francisco’s district attorney, Ms. Harris did not seek the death penalty for a gang member who killed a police officer in 2004, a decision that inflamed tensions with the police.CreditMarcio Jose Sanchez/Associated Press

Now Ms. Harris is running for president as a “progressive prosecutor.” She says she sees no contradiction in the term, arguing that a tough prosecutor can also be a force for reforming the criminal-justice system. But already, mere weeks into her candidacy, she is facing a chorus of skepticism, especially from the left. The death penalty episode shows the tricky crosscurrents that she has had to weather — and that are likely to intensify as she tries to square that circle.

In a dozen years as the top law enforcement official of the city and then the state, Ms. Harris was as much politician as prosecutor, appearing to try to be all things to all constituencies. More practical than ideological, she was defined most by resisting easy definition.

She impressed Californians with her commanding presence — offering a preview of the senator the country would see pointedly questioning Republican nominees during confirmation hearings. But she developed a reputation for caution, protecting the status quo and shrinking from decisions on contentious issues.

Image

When Ms. Harris spoke at the 2012 Democratic National Convention, she was attorney general of California, having campaigned on her success in increasing conviction rates.CreditJason Reed/Reuters

Years before ending mass incarceration became a bipartisan cause, she started programs to steer low-level drug offenders away from prison and into school and jobs. At the same time, she touted her success in increasing conviction rates, and as attorney general remained largely on the sidelines as California scrambled to meet a federal court order to reduce its swollen prison populations. She also repeatedly sided with prosecutors accused of misconduct, challenging judges who ruled against them.

“She played it very careful,” said Laurie Levenson, a professor at Loyola Law School in Los Angeles who served on an independent panel that investigated one of the cases of prosecutorial misconduct while Ms. Harris was attorney general. “She had her sights set on what her future might be, and she realized every day she was navigating a minefield, because she had law enforcement to deal with, she had the public to deal with, the minority community to deal with. I think she was trying to be very careful not to alienate.”

She has also had to navigate the shifting politics of crime and race — and the expectations they bring with them.

Image

Ms. Harris ran unopposed in 2007 for a second term as district attorney.CreditJane Philomen Cleland

Ms. Harris began her career at a time when many African-American law enforcement officials were joining, even amplifying, law-and-order calls for stricter prosecution, to stop the drugs and violence victimizing their communities. When she became attorney general in 2011, crime was falling and the debate was evolving. Now, in the era of Black Lives Matter, many in the black community argue that the biggest law-enforcement problem is law enforcement itself, and her record is being assessed against calls for a wholesale reimagination of the criminal justice system — who should go to prison and for how long; indeed, should any but the most heinous criminals go to prison at all?

At the other end of the political spectrum, President Trump has sought to frame the immigration debate around fear of rising crime, teeing it up as a campaign issue for 2020. In the waning days of the partial government shutdown over his demand for a border wall, he tweeted what he called a new Republican theme for the next two years: “BUILD A WALL & CRIME WILL FALL!”

Ms. Harris scorns what she calls false choices, and says her critics are imposing them on her record. Those who have worked for her call her disciplined, a characterization she prefers to “cautious.” She describes her thinking — about criminal justice, but also about the other issues animating her presidential candidacy, like health care and economic inequality — as scientific. “It’s a hypothesis; this is how we can do things better,” she said in a recent interview. “You have to inform it with: Where’s the empirical evidence? Where is the data? Where is the detail?”

She does not like to be boxed in.

“The thing that drives Kamala Harris crazy above all other things is to get reduced to a demographic archetype,” said Sean Clegg, a longtime strategist for Ms. Harris and other California Democrats. “‘You are XYZ because you are a black woman; you are XYZ because you’re from San Francisco.’ She’s a complex person like all of us. She’s also been the first. That’s a lot more difficult than it looks.”

A ‘1999 Version of Olivia Pope’

Ms. Harris, now 54, confounded expectations just by becoming a prosecutor.

She is the daughter of immigrants — her mother from India, her father from Jamaica — who met as civil-rights activists in graduate school at Berkeley and gave Ms. Harris what she calls a stroller’s-eye view of the demonstrations of the 1960s.

Most of her law school peers went into civil-rights work, recalled Jeff Adachi, who was a tutor in Ms. Harris’s program at the University of California’s Hastings College of the Law and later faced off against her as San Francisco’s elected public defender.

“You didn’t have a lot of minorities who were wanting to be part of law enforcement,” he said.

She had to explain to family and friends before taking her first job out of law school, as a prosecutor in Oakland in 1990. As she described it in the recent interview, “When we want to reform systems, it shouldn’t and it can’t only be from the outside on bended knee or trying to break down the door.”

She added, “Let’s try and do it from the inside and understand that those people are going to stand in a courtroom and ask for guilty verdicts for people who do harm to the community — and that’s consistent with all progressive values.”

She earned a reputation as a sharp trial lawyer, and in 1998 became the managing attorney in charge of the career criminal unit in the San Francisco district attorney’s office. But she left within two years, frustrated by what she saw as the dysfunction of that office, which had the state’s lowest conviction rate and lacked basics like email and enough phones.

She worked for the city attorney, and she prepared to run against her former boss, Terence Hallinan, in 2003.

Ms. Harris had made political and social connections, dating Willie Brown, the powerful speaker of the California House, and serving on the board of the city’s Museum of Modern Art. But her polls showed she was a relative unknown.

Mr. Hallinan, a former defense lawyer and a son of a Progressive Party presidential candidate, had infuriated the police department by winning indictments of top brass in a scandal involving the assistant chief’s son. Ms. Harris campaigned between Mr. Hallinan and a more law-and-order candidate, on a platform that ran the gamut: professionalizing the office and improving relations with the police, opposing the death penalty and creating programs to steer first-time nonviolent offenders away from crime.

She brought a rare perspective — elected district attorneys are more typically white men; a 2015 study by the Women Donors Network found that just 1 percent are women of color. Communities of color, she argued, wanted tougher treatment for the drug dealers victimizing them; what they didn’t want from the police was excessive force.

Image

An appearance at the City of Refuge Church in Gardena, Calif., during the 2010 campaign for attorney general.CreditMichal Czerwonka/The Bay Citizen

Almost immediately, her decision on the death penalty in the officer’s killing inflamed tensions with the police. But it was pragmatic as well as principled: She knew that San Francisco jurors rarely if ever returned death sentences. And despite the protests, polling showed that the public supported her.

Some contend that the episode spooked her, that she spent the rest of her tenure trying to make amends with the police. Ms. Harris scoffs at the idea, pointing to her diversion program that allowed young low-level offenders to avoid incarceration if they enrolled in school full time and kept a job. “You think law enforcement was supportive of that?” she said.

That program was relatively small, with only about 300 graduates over eight years. Mr. Adachi and others complained that it took only the offenders most likely to succeed. But its recidivism rate was remarkably low: less than 10 percent, compared with 53 percent statewide.

Arguing that students who skip school are the ones who end up in the criminal justice system, Ms. Harris also started an anti-truancy program. She described it as carrot-and-stick: It threatened prosecution for parents whose children were chronically absent, but also helped them with health care problems and other hurdles to getting their children to school.

Critics, though, said it was more stick than carrot, and failed to grapple with the depths of the social problems parents were struggling against.

Either way, the program reflected Ms. Harris’s approach to her job.

Image

Ms. Harris, pictured in 2013 with firearms seized by law enforcement, worked to reduce gun violence in California.CreditDamian Dovarganes/Associated Press

“Fierce,” said Lateefah Simon, a onetime teenage shoplifter who became executive director of a center that helps lift young women out of lives of crime. Ms. Harris recruited her to work in the district attorney’s office, instructed her to lose the Pumas and track pants, bought her a suit and told her she needed to understand the penal code. Ms. Harris herself kept an immaculate desk, with little more than a notepad and a keyboard at her fingertips.

“She’s not easy,” Ms. Simon said. “If you beat up a woman in front of her children, you are going to jail. At the heart, she is a prosecutor. She wants to hold people accountable.”

Suzy Loftus, who started working for Ms. Harris as a campaign volunteer in 2003 and is now running for district attorney, recalls Ms. Harris’s instruction as she swore her in as a prosecutor: “When you go into court tomorrow,” she told her, “you look the judge in the eye and say, ‘Suzy Loftus, for the people.’” (“For the people” is now the slogan for Ms. Harris’s presidential campaign.)

“It’s professional and it’s about dignity,” Ms. Loftus said. “But it’s also about giving dignity to people who are most impacted by the system.”

But it was Ms. Harris’s success in increasing conviction rates that became a central boast of her campaign for attorney general in 2010.

An article in San Francisco Weekly that year challenged the numbers, noting that most of the convictions had come from plea deals, and that the conviction rate for cases that went to trial was lower than Mr. Hallinan’s, and had dropped over the previous two years. Assistant prosecutors were quoted saying that Ms. Harris had pressured them to take weak cases to trial in an attempt to look tough on crime as she prepared to run beyond the liberal city.

Her office defended her by noting that she had won stiffer sentences than her predecessors, by demanding prison time instead of probation for crimes including robbery and home burglary.

Ms. Simon, who was awarded a MacArthur “genius” grant in 2003 for her leadership on juvenile justice and now leads the Akonadi Foundation, a racial justice organization in Oakland, says she fights with her “radical friends” who think Ms. Harris was not progressive enough on crime. “I say, I’d love to see you run for D.A. and run a better office.”

Video

Senator Kamala Harris, Democrat of California, is joining the race for the White House. Ms. Harris becomes the fourth woman currently serving in Congress to announce her presidential ambitions.CreditCreditSarah Silbiger/The New York Times

Ms. Harris, she said, had to contend with expectations from all sides.

“She instinctually but also strategically had to think about the way people saw her,” Ms. Simon said. “The expectations not just of a black woman elected, but with black folks, they expected so much of her to go and revolutionize the system in four to eight years, which is impossible.”

Reform, at a Remove

Ms. Harris ran unopposed in 2007 for her second term — the only San Francisco district attorney to have done so in nearly two decades. And she became increasingly well known nationally, publishing her first book, “Smart on Crime: A Career Prosecutor’s Plan to Make Us Safer,” as she prepared to run for attorney general in 2010.

She took office at the ideal moment for a prosecutor who wanted to rethink the criminal justice system.

A panel of federal judges had ruled that overcrowding in California prisons amounted to cruel and unusual punishment — prisoners were stacked in triple bunk beds in gymnasiums and dying for lack of medical care — and ordered the state to reduce the population by about 40,000.

The debate over prison crowding had been long-running and contentious, with victims’ rights groups and law enforcement officials opposing the idea of prisoner release. Ms. Harris stayed above the fray, as she would on a range of issues throughout her tenure, seeing herself less as a decision maker than as a lawyer serving a client.

She had campaigned to the right of her Republican opponent on the question of easing the state’s tough three-strikes law. Once in office, she declined to take positions on ultimately successful ballot initiatives intended to reduce prison populations — one expanding opportunities for parole, the other reducing many nonviolent felonies to misdemeanors.

Image

Steve Cooley, the district attorney of Los Angeles County, was Ms. Harris’s Republican opponent for attorney general.CreditRich Pedroncelli/Associated Press

She argued that because she was tasked with writing the descriptions of the initiatives that would appear on the ballot any public statements on the proposals might create the impression that she had a finger on the scale. This departed, though, from the practice of previous attorneys general.

After the Supreme Court upheld the judges’ overcrowding order, the state promised to “promptly” release a significant number of nonviolent prisoners, giving credit for time served. A delay in meeting that promise drew a judicial scolding in 2014. The state’s response proved embarrassing, and unsuccessful: Reducing the prison population, Ms. Harris’s office maintained, would hurt California’s ability to fight wildfires by shrinking the pool of forced labor.

“She really was a sideline player in all the decarceration efforts,” said Robert Weisberg, a law professor and co-director of the criminal law center at Stanford. “She didn’t stake out a strong position on what to do other than, ‘Let’s promote re-entry and anti-recidivism programs.’”

The California attorney general’s office is large, about 5,000 lawyers, and Ms. Harris said she was unaware of the brief arguing for cheap prison labor. “A previous A.G. said to me, ‘You are going to inherit an office of 5,000 mistakes waiting for you every day,’” she said in the interview. “I have always owned that responsibility.”

That was also her response to criticism that she had resisted appeals for DNA testing from Kevin Cooper, a death row inmate whose case had been taken up by groups including the American Bar Association and the American Civil Liberties Union. Ms. Harris said she learned of the case in a New York Times column last year — after which she urged testing.

Image

Kevin Cooper, pictured in 1983, was convicted of a quadruple murder and sentenced to death.CreditAssociated Press

Beginning in the summer of 2014, the nation — and with it, California’s attorney general — was thrust into a debate over police brutality, by the deaths of black men in confrontations with the police in Ferguson, Mo.; Baltimore; and other cities.

Ms. Harris won praise for releasing statewide data in a way that informed rather than inflamed the brutality debate: It included numbers on the use of police force but also on use of force against officers. She instituted body cameras for police agents who worked in her office, and offered implicit-bias training for police statewide.

But she declined to support statewide regulations for the use of body cameras, agreeing with local departments that they should set their own standards. And she did not support a bill that would have required the attorney general to investigate police shootings.

Her office was also forced to confront an uproar over prosecutorial misconduct, with judges disciplining local prosecutors for lying and tampering with evidence. It was an issue she had faced as district attorney in a scandal involving drug testing at the San Francisco Police Department crime lab.

A technician had been skimming drugs to feed her own habit, and Ms. Harris’s chief drug prosecutor had warned that she was sabotaging evidence. Ms. Harris said she only learned of the problem several months later, when it was revealed publicly.

A judge then ruled that the district attorney’s office had violated constitutional protections requiring prosecutors to turn over any information that might damage witnesses’ credibility, and criticized the office for failing to tell defense lawyers about crimes or misconduct on at least 60 police officers’ records.

Ms. Harris responded by accusing the judge of a conflict of interest because she was married to a defense attorney who had handled a case involving the lab. (A court rejected her motion.)

As attorney general, Ms. Harris defended prosecutors by appealing judges’ rulings — dropping one appeal, during her Senate campaign, only after a video of judges criticizing her office went viral.

In a case in Orange County, a public defender had discovered that the district attorney’s office was strategically placing jailhouse informants, offering them leniency if they could coax confessions from fellow inmates. A judge found that the district attorney’s office had lied to him about the use of informants and withheld potentially favorable evidence from defense lawyers.

When the judge disqualified the entire office from a death penalty case, Ms. Harris appealed, accusing the judge of abusing his discretion. While she opened an inquiry into the case at hand, she rejected repeated calls for a broad investigation of the prosecutor’s office.

In the recent interview, Ms. Harris said her decision reflected her experience when others had tried to disqualify her from the San Francisco death penalty case. It was up to voters, not the attorney general, she said, to remove elected prosecutors. “I knew misconduct had occurred, clearly it had,” she said. “And it was being handled at the local level.”

Frustrated by her refusal to investigate, Erwin Chemerinsky, then the law school dean at the University of California, Irvine, joined with a former attorney general to ask the Justice Department to examine what they believed was a pattern of civil rights violations in the prosecutor’s office. Their letter was signed by 25 prominent law professors, prosecutors and defense lawyers.

“Twice Kamala Harris called on my cell and said she was on top of it and looking into it,” he said. “To my knowledge, the California A.G. never did anything with regard to the scandal.”

Professor Chemerinsky emphasized that he admired Ms. Harris’s work as a senator. But, he said, her office’s decisions on Orange County were “outrageous.”

“Their reaction ranged from silence to criticizing the judge who found the misconduct,” he said. “Never did they attempt to be a force for reform.”

Both, Not Either/Or

In September 2011, Ms. Harris announced that she would not sign the National Mortgage Settlement, negotiated by the Obama administration with the banks at the center of the foreclosure crisis. What happened next, Ms. Harris and her supporters say, illustrates her agility in balancing competing interests.

The proposed settlement essentially gave the banks amnesty against further prosecution. Ms. Harris wanted to leave open the possibility of investigation and lawsuits, and promised Californians to lock up the bankers responsible for the fraud.

As the top prosecutor for the state with the bulk of foreclosures, she had the power to determine the fate of the deal. The lobbying was intense — from housing groups, from homeowners, from the Obama administration. “It was a constant tension between speeding the relief quickly in the middle of the crisis or taking the time to go through this investigation, which could take years, while people were losing their homes every day,” said Brian Nelson, a deputy who helped Ms. Harris negotiate the deal.

She did not kill the settlement. She emerged with a better one: The banks agreed to $18 billion in debt reduction that Ms. Harris said would allow California homeowners to stay in their homes, and the national agreement included $2.5 billion for a fund to provide educational counseling and other services for those in danger of foreclosure.

But critics, especially on the left, have long said that the settlement was no grand bargain. It did not require banks to pay much out of pocket; $4.7 billion of the $18 billion in relief came from forgiving second mortgages, many of which the banks would have written off anyway because they were so severely underwater, and $9 billion came from homeowners selling their homes for less than the value of their mortgages, meaning that homeowners did not stay in their homes.

Ms. Harris retained the right to investigate and pursue claims against the banks, winning $921 million against five institutions. But no one went to prison; she explained to voters that she was frustrated, too, but the state could go only “where the evidence took us.”

And most of the $410 million California got to help at-risk homeowners never made it to them; a judge found that Governor Brown diverted $331 million to plug budget holes. Ms. Harris recused herself from defending the governor because of her role in the settlement. She rebuffed housing advocates’ requests to meet with her, offering little more than a brief statement that the money should go to homeowners.

Her decision to fight the ruling that had struck down California’s capital punishment law in 2015 created similar disappointment among those who had applauded her refusal to call for the death penalty in San Francisco.

“This was not a situation where they were compelled to respond,” said Hadar Aviram, a law professor at Hastings who started a petition against appealing. “They could have done nothing.”

The public, however, had three years earlier rejected a ballot initiative that would have abolished the death penalty in California.

Image

Election night in 2016.CreditChris Carlson/Associated Press

In the interview, Ms. Harris said that as attorney general she had had to represent her client, the governor, who supported the death penalty appeal. Even so, she had cited her discretion in deciding which cases to pursue when she declined requests to defend Proposition 8, a successful ballot initiative defining marriage as between a man and a woman, in federal courts.

Once again, she said, her critics were framing a false choice: She could defend the death penalty for a client and still be opposed to it personally.

Just as a prosecutor can be tough but also progressive.

“One human being kills another human being, a woman is raped, a child is molested — are we really saying there should be no consequence and accountability?” she said. “I believe it is consistent with knowing that there is bias in the system, knowing that there are deep flaws in the system, knowing that there has to be reform of the system.”

She added: “Are we really saying that you’re either that, or you believe that there should be serious consequences for people who commit serious crimes? I am both.”