Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

A California man accused of assaulting another person at a Los Angeles-area bar over a hat that read "Make America Great Again" in Russian is facing four years in prison, prosecutors said.

David Delgado, 32, pleaded no contest Wednesday to a felony count of assault by means of force likely to produce great bodily injury in the attack at the Hermosa Beach bar on Sept. 2, the Los Angeles County District Attorney's Office said in a statement.

David Delgado in a police photo. Hermosa Beach Police Department

The plea agreement calls for four years in prison, the DA's office said, but sentencing will be up to the judge. A no contest plea is not a guilty plea, but it results in a conviction.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

Authorities say Delgado, of the Winnetka neighborhood of Los Angeles, confronted the victim in the bar's bathroom, asking the man what was written on the hat. When the victim responded, Delgado got angry and assaulted him, prosecutors have said.

Police have said Delgado punched the man repeatedly in the face, causing him to fall to the ground. The victim suffered serious injuries, according to the DA's office.

Delgado then stole the hat and fled, police have said.

A message left with Delgado's attorney was not immediately returned Wednesday afternoon.

"Make America Great Again" was Donald Trump's slogan during his presidential campaign. It is not clear whether the victim was a Trump supporter.

Hermosa Beach is a coastal city in Los Angeles County southwest of downtown Los Angeles.