A California man was arrested Sunday after allegedly attempting to stab a Republican congressional candidate with a switchblade, according to the Alameda County Sheriff's Office.

The man, identified as 35-year-old Farzad Fazeli, reportedly approached Republican candidate Rudy Peters in an aggressive manner and made disparaging, profanity-laced remarks about the GOP and President Trump, according to witness statements. Peters, who is running against incumbent Democratic Rep. Eric Swalwell, was campaigning at a fall festival in Castro Valley, California.

During the incident, Fazeli allegedly pulled out a switchblade knife and attempted to stab Peters, but the knife malfunctioned. Peters then got into a physical altercation with Fazeli.

Republican congressional candidate Rudy Peters CBS San Francisco

"He would have stabbed me," Peters told CBS San Francisco. "I mean, he had it out saying, 'I'm going to kill you MF-er! I'm going to kill you!' I could see his thumb trying to get the knife out."

Get Breaking News Delivered to Your Inbox

Peters, who was not injured in the incident, told the station he "jumped around the table" and grabbed the suspect, wrestling him to the ground.

The suspect then fled the scene, but was detained a short time later by deputies, the sheriff's department said. Authorities said they found the switchblade knife in his possession.

Fazeli was arrested for felony assault, criminal threats, brandishing a weapon and possession of a switchblade knife. He was booked into Santa Rita Jail, authorities said, and his case has been forwarded to the district attorney.

Fazeli made his first court appearance on Tuesday, and his attorney argued he is the victim in the incident.

"My client at this point was afraid for his life and afraid for his health and safety. And I believe that it is alleged that he pulls out a folded knife. The knife was never opened," defense attorney Frederick Remer said.

Peters said he never worried about his safety and the safety of his supporters until now.

"I've asked my supporters and followers at open events, I don't want them around me. I don't want their safety in jeopardy," Peters told CBS San Francisco.

On Tuesday, Peters' opponent posted on Twitter about the attack, saying he was "glad to hear Mr. Peters is okay." He also condemned the use of violence in any disagreement, political or otherwise.

On Sunday, my opponent @PetersCongress was attacked at his campaign booth in Castro Valley. I’m glad to hear Mr. Peters is okay. But it’s NEVER okay to use violence to settle political disagreements (or any disagreement). Fortunately, @ACSOSheriffs arrested the suspect. — Eric Swalwell (@ericswalwell) September 11, 2018

Fazeli's bail was set at $55,000. His family said they plan to get him out of county jail Tuesday night. He has a stay away order to keep his distance from Peters after the incident, CBS San Francisco reports.