A California man has been arrested after attempting to stab a Republican congressional candidate with a switchblade, authorities said.

The incident took place Sunday afternoon at the Castro Valley Fall Festival in the East Bay, about 15 miles southeast of Oakland. There, Rudy Peters, a GOP candidate running to represent California's 15th Congressional District, was standing at a vendor booth to promote his campaign when he was approached by a man with a knife.

According to the Alameda County sheriff's office, the man went up to Peters “in an aggressive manner and made disparaging remarks about his political party and elected officials."

"Then he stops, and he turns around and says, 'I’ll show you,' and he charges my table,” Peters told BuzzFeed News.

Peters told the San Francisco Chronicle the man threw a cup of coffee toward him and threatened to kill him, so he grabbed a sign from a cupcake booth to defend himself.

The man pulled out a switchblade and tried to stab Peters, but the knife malfunctioned, the sheriff's office said. The two engaged in a struggle, after which the man ran from the candidate's booth, authorities said.

Deputies found 35-year-old Farzad Fazeli soon afterward with a switchblade knife in his possession. Fazeli was arrested on charges of felony assault, criminal threats, brandishing a weapon and possession of the knife.

No one was seriously injured in the incident, authorities said. Fazeli was booked into Alameda County Santa Rita Jail.

“It’s a shame,” Peters 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's campaign did not immediately return a request for comment early Wednesday. His campaign website shows he has aligned himself closely with Trump, including prominently displaying “MAGA” — short for the Trump campaign slogan “Make America Great Again” — near a picture of his face.

The Republican is running against Democrat Eric Swalwell, the incumbent who has held the seat since 2013.

Swalwell tweeted Tuesday he was glad to hear his opponent was unharmed.

"But it's NEVER okay to use violence to settle political disagreements (or any disagreement)," Swalwell added.

California's 15th Congressional District is rated “solid Democrat,” according to the political polling website Five Thirty Eight, with Swalwell forecast to receive 77 percent of the vote to Peters's 23 percent in the coming November general election.

Read more: