Sen. Kamala Harris, the presumptive Democratic nominee for vice president, was the “worst nightmare” as a prosecutor, former New York City Mayor Rudy Giuliani said on Wednesday.

“She was, in some cases, overly lenient and other cases ridiculously strict, and in some cases looks completely corrupt,” Giuliani told “Fox & Friends First.”

Before being elected to the U.S. Senate, Harris served as a public prosecutor and district attorney in San Francisco and then became California's attorney general.

Giuliani said that in order to “impress the police,” Harris “prosecuted 1,500 marijuana cases.”

“I was a U.S. attorney for 13 years and I never prosecuted a marijuana user case. She’s one of the reasons President Trump had to pass the prison reform act because she flooded the prisons which were called in the articles in the California newspapers mass incarceration,” Giuliani said.

KAMALA HARRIS ADMITS 'UNINTENDED CONSEQUENCES' IN ANTI-TRUANCY LAW WHILE SHE WAS CALIFORNIA AG

Presumptive Democratic nominee Joe Biden announced his pick of Harris as his running mate on Tuesday evening.

While her past as a prosecutor could help counter attacks from the Trump campaign that a Biden-Harris ticket is soft on crime, it could hurt her with a left of the party that has entertained calls to abolish, defund or overhaul police departments -- although the initial reaction from progressive standard-bearers and groups was overwhelmingly positive.

An example of the kinds of attacks she may face was demonstrated in a furious New York Times op-ed in January 2019, which attacked her claim to be a “progressive prosecutor” from the left.

“Time after time, when progressives urged her to embrace criminal justice reforms as a district attorney and then the state’s attorney general, Ms. Harris opposed them or stayed silent,” the op-ed from law professor Lara Bazelon said. “Most troubling, Ms. Harris fought tooth and nail to uphold wrongful convictions that had been secured through official misconduct that included evidence tampering, false testimony and the suppression of crucial information by prosecutors.”

Harris refused to take a position on a pair of sentencing reform ballot measures, arguing she must remain neutral because her office was responsible for preparing ballot text. She also defended the death penalty in court, setting aside her personal opposition to capital punishment.

Also controversial was Harris’ role in a law that threatened parents of truant children with criminal penalties.

CLICK HERE FOR THE FOX NEWS APP

Giuliani said that, “ironically,” Biden’s only achievement was passing the 1994 crime bill.

“It took President Trump to have to fix that. He couldn’t fix it, Obama couldn’t fix it, President Trump had to let all of the African Americans, and some others that were put in jail for ridiculous periods of time, for just having marijuana. [Trump] had to take them out of prison. [Harris] put them there.”

Fox News' Adam Shaw contributed to this report.