A man who angrily confronted, threatened and yelled racial slurs at a pregnant African-American woman at a Fullerton bus stop was sentenced Monday to five years in prison over the objections of prosecutors who said he should have received a longer sentence because of his violent past.

Tyson Theodore Mayfield, 43, accepted a court offer requiring he plead guilty to making criminal threats and violating someone’s civil liberties and admitted to committing a hate crime.

The case drew the personal attention of Orange County District Attorney Todd Spitzer, who along with several senior members of his staff attended a pair of hearings in recent weeks opposing the offers presented to Mayfield by Orange County Superior Court Judge Roger B Robbins. The judge initially offered Mayfield two years behind bars, Spitzer said, before upping it to five years in prison, a sentence prosecutors still say is too light.

The judge, as well as Mayfield’s attorney, noted that the confrontation with the woman at the bus stop was not as violent as Mayfield’s past offenses, that he did not use a weapon or cause any injuries, and that he had accepted responsibility for his actions at an early stage of the legal proceedings. Mayfield did not speak during the hearing beyond confirming for the judge that he understood the deal.

On Sept. 17, Mayfield yelled racial slurs at a pregnant woman waiting for her boyfriend at the Fullerton Transportation Center, which includes a train station. Mayfield, who prosecutors describe as shirtless while confronting the woman and having multiple swastika and white supremacist tattoos, threatened to make her “drop her baby,” according to court filings.

The woman pepper-sprayed Mayfield, who ran off before officers arrived, according to court filings. He soon returned, prosecutors said, and once again began yelling racial slurs and threatening the woman, who ran to a nearby cafe for safety until officers returned to take Mayfield into custody.

“I had to literally run for my life and the life of my unborn child when I was eight months pregnant,” the victim told Judge Robbins on Monday. “I feel he should be in prison for a very long time.”

It was the latest in a string of violent incidents carried out by Mayfield. According to court records, in 2005 Mayfield stabbed a man in the face in Orange, the same year punched a man at a gas station after approaching a couple asking for change and, in 2017, pummeled a man in Fullerton after asking for a lighter. Mayfield appeared to choose his victims based on the color of their skin and attacked with no provocation.

“He is a dangerous person,” Spitzer told the judge. “There is just no question he is a racist. … Quite frankly, he scares me, and he scares a lot of people.”

After the hearing, in a courtroom hallway, Spitzer talked with civil rights activists who had attended the hearing, including heads of the local chapters of the NAACP, the Anti-Defamation League and the county’s human relations commission. He said he is taking a hands-on role in the prosecution of hate crimes, which he noted have increased in recent years both locally and nationally.

“I made a big commitment when I ran for office that we will not tolerate hate in this community,” Spitzer said.

Had he been convicted as charged, Mayfield would have faced up to 38 years to life in prison. With credit for time already served awaiting trial, prosecutors estimated that he will likely spend around two and a half more years behind bars.