MARTINEZ (KPIX 5) — The Department of Homeland Security and the FBI are investigating after a hacker attempted to access the election internet system for the Contra Costa County Clerk and Recorder’s office.

Clerk and Recorder Joseph Canciamilla said the spearphishing attack happened March 18. A hacker sent an email to an election staffer disguised as a contact the employee had emailed in the past.

READ MORE: Oakland Police Arrest Homicide Suspect Who Fatally Shot Male Victim, Fired at Firefighters

Canciamilla said the email was “sophisticated” and appeared to be authentic. He said he believed it was a targeted attack aimed at accessing the department’s email system. But he said security protocols quickly intercepted the threat.

READ MORE: San Francisco Police Arrest Man Suspected of Carjacking Uber Driver in SoMa

“We have to assume that it was designed specifically with the intent to do damage to our specific system and it wasn’t just a random phishing expedition,” he said.

Canciamilla said he reported the attack to the Secretary of State’s office and then it was later elevated to DHS and the FBI. He said officials determined that the attack fit the pattern of previous overseas attacks. He stressed that the attack did not attempt to access any actual election information.

MORE NEWS: 49ers Playoffs: Faithful Gear Up As Showdown Vs. Packers Nears

KPIX-5 security analyst Jeff Harp, a former FBI agent, said spearphishing attacks often originate in Europe, specifically Russia, but are difficult to track.