In 1981, when Chesa Boudin was 14 months old, his parents — members of the radical and violent Weather Underground — left him with a babysitter so they could take part in an armored car robbery. It became one of New York's most notorious botched heists, a crime that left two police officers and a Brink's truck guard dead in a New York suburb.

Thirty-eight years later, Boudin is set to become San Francisco's top prosecutor. In a matter of weeks, he will be sworn in as the city's district attorney, the latest in a line of prosecutors seen as criminal justice reformers who are taking the reins across the country.

Like his peers on the left, Boudin ran on a platform of ending "mass incarceration," eliminating cash bail, creating a unit to review wrongful convictions and refusing to cooperate with Immigration and Customs Enforcement, or ICE, as well as prosecuting ICE agents who violate so-called sanctuary city laws. He also wants to move the district attorney's office away from prosecuting prostitution and minor quality-of-life crimes to focus, instead, on taking on corporations and prioritizing the most serious offenses.

Boudin, 39, spent decades visiting his parents in prison and, as a result, learned the ins and outs of the criminal justice system from a unique vantage point. Boudin's parents were getaway drivers in the attempted Brink's robbery in 1981 in Nanuet, New York, about 35 miles north of New York City. His mother, Kathy Boudin, pleaded guilty to murder and robbery and was imprisoned for more than two decades. His father, David Gilbert, is still behind bars after he was convicted of murder and robbery.

(His parents did not fire a shot that day — the officers and the guard were killed by the Black Liberation Army, which was a partner with the Weather Underground in the attempted robbery to get money to finance their radical activities. They have since expressed regret for the deaths.)

Kathy Boudin is led from the Rockland County Courthouse in New York on Nov. 21, 1981. AP file

"My earliest memory is visiting them in prison, but I didn't see the trial or anything like that," Boudin said in an interview last week. "My mother negotiated a plea deal, and my father went to trial. I think one thing we notice in their case that kind of stands out is how, in some ways, arbitrary the outcomes in the criminal justice system can be. And they did basically the same thing, identical thing."

He added: "Certainly, one lesson I learned is how ... punitive it can be when your dad, arguably, was given an extra 55 years' minimum sentence than your mother. It also obviously highlights the value of a good lawyer."

With his parents in prison, Boudin was raised in Chicago by Weather Underground founder Bill Ayers and his wife, Bernardine Dohrn, both of whom had been federal fugitives in the 1970s for their anti-war activities. Boudin would go on to study at Yale and Oxford, where he was a Rhodes Scholar. He would later spend a decade traveling in South America, working, among other jobs, as a translator for Venezuela's president at the time, Hugo Chavez, before becoming a public defender in San Francisco.

He entered the district attorney's race as an underdog — someone who had never prosecuted a case who was going up against a more established candidate backed by Sen. Kamala Harris, D-Calif., herself previously the city's DA.

Boudin, who put his life story front and center during the campaign, won by fewer than 3,000 votes in November.

"I want to restore a sense of compassion," Boudin said. "That's just a true, motivating fact that we do have compassion for victims, compassion for the community ... compassion for the family members of people who are accused of committing crimes and compassion for the people who, themselves, have caused harm. We need to hold them accountable in a way that is serious.

Police at the scene of the Brink's armored truck robbery in Nanuet, New York, on Oct. 21, 1981. AP file

"Because I think that, often, the criminal justice system is dehumanizing to all that it touches from all sides," he added. "And people are dealing with real trauma in the case of violent crime and experiences that leave people in fear and make it more likely the people will themselves commit crimes."

Boudin's platform made him the target of a number of opponents, such as the San Francisco Police Officers Association, which spent more than $650,000 to defeat him, sending mailers to voters alleging that he was the top choice for criminals and that his "reckless policies will cost lives."

"For him to just basically say, 'Hey, everyone's done their time; they should come out,' we don't think that is a safe approach," Tony Montoya, president of the officers association, said in an interview.

Montoya accused Boudin of a "kind of almost a criminal first, victim second-type approach," adding: "We looked at it as a public safety issue. This was never about Mr. Boudin as a person. This was never about who his parents were. This was about his policies and how they would impact public safety, and public safety is what we do."

Others did draw a direct line between Boudin and his parents. The San Francisco Deputy Sheriffs' Association posted a video on its Facebook page titled "Terrorist's Son as SF District Attorney?" and calling Boudin a "communist radical of sorts."

Once the election was over, Montoya and Boudin mentioned interest in sitting down to discuss cooperation and concerns.

"I've been really consistent throughout the campaign and since I won that I want to prioritize victims rights and I want to prioritize healing," Boudin said. "I appreciate that the [Police Officers Association] disagrees and has been critical of me and my way, but I've been very consistent in my commitments to victims. And I, myself, was a victim, indirectly, of my parents' crimes ... and I think there's a lot of room for improvement in what we're doing right now."

Chesa Boudin with his father, David Gilbert, in an undated photo at the maximum security prison where Gilbert was serving a sentence for the killing of a Brink's guard and two police officers during a robbery by the radical Weather Underground. Ralf-Finn Hestoft / Corbis via Getty Images file

Boudin's election marks the latest victory for a nationwide movement to elect candidates described as progressive reformers to similar positions. It's a trend that has come under fire from law enforcement at the highest levels, not least Attorney General William Barr, who said in August that "the emergence in some of our large cities of district attorneys that style themselves as 'social justice' reformers, who spend their time undercutting the police, letting criminals off the hook and refusing to enforce the law, [is] demoralizing to law enforcement and dangerous to public safety."

Boudin's campaign also was closely watched by prosecutors such as Philadelphia District Attorney Larry Krasner and Suffolk County, Massachusetts, District Attorney Rachael Rollins, whose jurisdiction includes Boston.

"What Chesa is saying is very close to what people want," Krasner told NBC News. "And what the institutions are saying is really the voice of the past."

He added: "We're seeing victories that no one thought were possible. We're seeing this in all kinds of different locations, even places where it seems quite unlikely."

Download the NBC News app for breaking news

Rollins, who said she spoke to Boudin on the night of his victory, praised his platform and his transparency.

"What I really admire about Chesa is — and I tried to do this myself as a candidate — he's not hiding the ball," she said. "He's not pretending to be something, wins and then becomes who he really always was. Chesa has made it very clear with respect to ICE, with respect to certain policies in that office, with respect to general principles, who he is going to be and what he is going to do."

Miriam Krinsky, executive director of the nonprofit group Fair and Just Prosecution, called Boudin's experience with his parents' imprisonment defining, and she recalled a recent group discussion in which his remarks stood out.

"Chesa chimed in and spoke from the heart about his own personal experience, having seen and watched those issues play out in the lives of members of his family," Krinsky said. "And it shaped me that, all of a sudden, we had that lived experience voice in the room within our elected leaders. And that's incredible. And so, for Chesa, it's real."