As she nears a decision on whether to seek the presidency, Senator Kamala Harris is taking on what could be a hurdle in a Democratic primary: her past as a prosecutor.

In her memoir published on Tuesday, the California Democrat describes herself as a "progressive prosecutor" and says it is a "false choice" to decide between supporting the police and advocating for greater scrutiny of law enforcement. The argument is aimed at liberal critics of her record who argue she was sometimes too quick to side with the police and too slow to adopt sentencing reforms.

"I know that most police officers deserve to be proud of their public service and commended for the way they do their jobs," Ms Harris writes in The Truths We Hold. "I know how difficult and dangerous the job is, day in and day out, and I know how hard it is for the officers' families, who have to wonder if the person they love will be coming home at the end of each shift."

But, she continues, "I also know this: it is a false choice to suggest you must either be for the police or for police accountability. I am for both. Most people I know are for both. Let's speak some truth about that, too."

After high-profile fatal shootings involving police officers and unarmed people of colour, the criminal justice system's treatment of minorities is a top issue among Democratic voters. The passage suggests Ms Harris is aware her seven years as the district attorney in San Francisco, followed by six years as California's attorney general, is something she will have to explain and signals how she may frame her law enforcement career if she decides to run for the White House.

"It's a presidential campaign, and every aspect of a candidate's record is going to be scrutinised and they're going to have to answer for it," said Mo Elleithee, a long-time Democratic operative who leads Georgetown University's Institute of Politics and Public Service. "She knows that this is something that's heading her way and a good candidate is one who doesn't wait for it to hit them. A good candidate is someone who addresses it proactively, and she appears to be doing that."

Beyond the book, Ms Harris recently supported legislation that passed the Senate late last year and overhauls the criminal justice system, especially when it comes to sentencing rules.

In the book, Ms Harris recounts an instance when she was an intern at the Alameda County district attorney's office and an innocent bystander was one of many people arrested during a drug raid. Ms Harris said she "begged" and "pleaded" on a late Friday afternoon for a judge to hear the case so the woman could avoid spending the weekend in jail.

Kate Chatfield, the policy director of the California-based criminal justice reform group Re:store Justice, said Ms Harris did do "some good" when she was in law enforcement but it was "incumbent on the public to hold her accountable for the ways in which she either didn't do enough or actually did some harm."

"When the conversation shifts, one should be expected to be questioned about those choices," Ms Chatfield said, noting among other issues Ms Harris's advocacy for tougher truancy laws.

By addressing policing in the book, Ms Harris is taking on an issue that confronted Democrats and some Republicans in 2016. Democrat Hillary Clinton was criticised for her husband's role in passing the 1994 Violent Crime Control and Law Enforcement Act, which created stricter penalties for drug offenders and funnelled billions of dollars towards more police and new prisons.

The issue is likely to be the subject of fierce debate in 2020 as well and could expose divisions among the wide field of candidates – presenting hurdles for some and opportunity for others.

Who could be running against Trump in 2020? Show all 23 1 /23 Who could be running against Trump in 2020? Who could be running against Trump in 2020? Joe Biden The former vice president - poised to be a frontrunner - has announced his run. He recently faced scrutiny for inappropriate touching of women, but was thought to deal with the criticism well AFP/Getty Who could be running against Trump in 2020? Bernie Sanders The 2016 runner-up has announced that he will be running again in 2020 Getty Who could be running against Trump in 2020? Hillary Clinton The 2016 Democratic presidential candidate and former Secretary of State says she is “still considering” whether she will run again. Getty Who could be running against Trump in 2020? Pete Buttigieg The Indiana mayor and war veteran will be running for president. If elected, he would be the first openly LGBT+ president in American history. Getty Who could be running against Trump in 2020? Kamala Harris The former California attorney general will be running for president in 2020. Introduced to the national stage during Jeff Sessions’ testimony, she has endorsed Medicare-for-all and proposed a major tax-credit for the middle class. AP Who could be running against Trump in 2020? Elizabeth Warren The Massachusetts Senator has formally launched her bid for president in 2020. A progressive Democrat, she is a major supporter of regulating Wall Street. AP Who could be running against Trump in 2020? Beto O’Rourke The former Texas congressman told Oprah Winfrey that he “has been thinking about running for presidency”, but stopped short of formally announcing his bid to run in 2020. AFP/Getty Who could be running against Trump in 2020? Wayne Messam Mayor of the city of Miramar in the Miami metropolitan area, Wayne Messam has announced his bid. He intends to run on a progressive platform against the "broken" federal government. He favours gun regulations and was a signatory to a letter from some 400 mayors condemning President Trump's withdrawal from the Paris Climate Accord. Vice News Who could be running against Trump in 2020? Kirsten Gillibrand The New York Senator formally announced her presidential bid in January, saying that “healthcare should be a right, not a privilege.” Getty Who could be running against Trump in 2020? Cory Booker The New Jersey Senator has announced that he will be running for the presidency in 2020. If he secures the nomination he said finding a female vice president would be a priority. Getty Who could be running against Trump in 2020? John Delaney The Maryland congressman was the first to launch his bid for presidency, making the announcement in 2017. AP Who could be running against Trump in 2020? Julian Castro The former San Antonio mayor announced his candidacy in January and said that his running has a “special meaning” for the Latino community in the US. Getty Who could be running against Trump in 2020? Tulsi Gabbard The Hawaii congresswoman announced her candidacy in January, but is likely to face tough questions on her past comments on LGBT+ rights and her stance on Syrian President Bashar al-Assad. Getty Who could be running against Trump in 2020? Andrew Yang The entrepreneur has announced his presidential candidacy, and has pledged that he would introduce a universal basic income of $1,000 a month to every American over the age of 18. AFP/Getty Who could be running against Trump in 2020? Marianne Williamson The author and spiritual advisor has announced her intention to run for president. She had previously run for congress as an independent in 2014 but was unsuccessful. Getty Who could be running against Trump in 2020? John Kerry The former secretary of state has said he is still thinking about whether to run. Getty Who could be running against Trump in 2020? Michael Bloomberg The entrepreneur and former New York mayor– with a net worth of around $50bn – has said he will decide by the end of February whether to seek the presidency. AFP Who could be running against Trump in 2020? Howard Schultz Former Starbucks CEO Howard Schultz has not yet ruled out running for president in 2020, despite criticism that his bid could help re-elect Mr Trump by dividing the Democrat vote. AP Who could be running against Trump in 2020? Eric Holder The former attorney general has said he will decide in “the next month or so” whether to run as a 2020 presidential candidate. AP Who could be running against Trump in 2020? Eric Swalwell The California congressman said he is “ready to do this” and will decide before April whether to run. MSNBC Who could be running against Trump in 2020? Terry McAuliffe The former Virginia governor, who worked to elect Democratic governors during 2018 midterms, said there was a “50 per cent” chance he would run. AP Who could be running against Trump in 2020? Sherrod Brown The Ohio senator is still undecided about whether to run for president in 2020. Who could be running against Trump in 2020? Mitch Landrieu The former New Orleans mayor said he doesn’t think he will run for president, but “never say never”. AP Photo/Jacquelyn Martin

Former Vice President Joe Biden was the head of the Senate's Judiciary Committee when the 1994 crime bill – which is now criticised as having helped create an era of mass incarceration – was passed and signed into law, which could be an obstacle for him. New Jersey Senator Cory Booker was central to the passage of the Senate's criminal justice overhaul package and is certain to tout it if he decides to launch a presidential campaign. Meanwhile, Minnesota Senator Amy Klobuchar, who is also considering a 2020 bid, often refers to her own prosecutorial past.

The memoir – and the publicity surrounding it – will shift the 2020 campaign spotlight to Ms Harris this week after much of the focus has been on her Senate colleague, Elizabeth Warren. Last week, the Massachusetts Democrat became the most prominent person yet to take steps towards a presidential run by launching an exploratory committee. Her weekend trip to the lead-off caucus state of Iowa also generated largely flattering headlines.

Some criminal justice advocates said they were happy the issue would get more attention in 2020.

"When we had the 2016 elections, it was at the height of Ferguson and Baltimore, and we still didn't have serious engagement with criminal justice reform," said Phillip Goff, the director of the Centre for Policing Equity, referring to the protests that followed the deaths of black men by police officers in Missouri and Maryland. "My hope is that we require candidates to demonstrate that they know more than the catchphrases of the activists in their bases."

Surveys underscore the potency of criminal justice issues among Democrats. A February 2018 poll conducted by the Associated Press-NORC Centre for Public Affairs Research found majorities of Democrats – but far fewer Republicans – think there has been little progress for African-Americans on criminal justice or policing issues over the past 50 years. The poll showed 45 per cent of Americans, including 62 per cent of Democrats and 19 per cent of Republicans, thought there had been little to no progress on fair treatment for black Americans by the criminal justice system. Similarly, 46 per cent of Americans, including 63 per cent of Democrats and 23 per cent of Republicans, said there has been little to no progress for African-Americans on fair treatment by police.

While it is not yet clear how Ms Harris' prosecutorial background could affect her primary bid, it could help her if she faces President Donald Trump in the 2020 general election.

"He ran as the law-and-order president," Mr Elleithee said of Mr Trump. "Being able to go toe-to-toe with him on law and order in a smarter way, I think, is going to be important. Should she win the nomination and does it by navigating this topic well, then I think she would be a strong voice and a force to be reckoned with when it comes to issues of law and order, criminal justice and civil rights as they collide in a general election."