A Republican House candidate in California was attacked over the weekend by a man upset with the president and politics, authorities said.

The Alameda County Sheriff's Office said the incident happened at the Castro Valley Fall Festival Sunday afternoon and ended without serious injuries. The suspect, Farzad Vincent Fazeli, was arrested on charges of making criminal threats, exhibiting a deadly weapon and possessing a switchblade.

The alleged victim, Rudy Peters, who is running for the 15th Congressional District of California, told the San Francisco Chronicle a man walked up to his booth at the festival and made a series of "disparaging remarks" about Republicans and some of the party's leadership, including President Donald Trump.

"All of a sudden we hear someone screaming, '(expletive) Trump, (expletive) Trump!'" Peters told the newspaper, adding the man also held up his middle finger.

Peters, who said he was standing with Republican state Assembly candidate Joseph Grcar, told KPIX that Fazeli then picked up a coffee cup and threw it at them but missed.

Peters, a Navy veteran, said he then threw Fazeli to the ground, at which point Fazeli pulled a switchblade from his pocket and yelled, "I'll kill you!"

Peters told the Chronicle that he grabbed a sign from a nearby cupcake booth to use as a shield but Fazeli was luckily unable to open the blade.

Alameda County Sheriff's Office spokesman Sgt. Ray Kelly said "the knife malfunctioned" and "Fazeli fled the scene but was detained a short time later by deputies."

During a court appearance Tuesday, Fazeli's attorney, Frederick Remer, said Fazeli was the real victim, acting in self-defense, KPIX reported.

"It’s a shame," Peters, a vocal supporter of President Donald Trump, told the Chronicle. "People are just polarized right now, and this country’s divided and it’s just a mess. It shouldn’t be that way."

Peters' Democratic opponent, incumbent Rep. Eric Swalwell, sent a tweet Tuesday saying he was glad Peters was unharmed and condemning "the use of violence to settle political disagreements."