Palo Alto Police Chief Robert Jonsen appeared on track Tuesday to be elected the next sheriff of Santa Clara County.

With nearly 90 percent of the county’s 754 precincts reporting, Jonsen held the unofficial lead with 51.5 percent of the vote over retired sheriff’s Capt. Kevin Jensen, who had 48.5 percent.

Jonsen and Jensen are seeking to replace Acting Sheriff Ken Binder, who was recently appointed to the interim position from undersheriff following the retirement of former Sheriff Laurie Smith.

Smith, after serving as sheriff for the past 24 years, announced earlier this year that she would not seek reelection amid an investigation into claims that the Sheriff’s Office traded concealed carry weapon permits for campaign donations under her watch.

Smith abruptly retired on Halloween. Last Thursday, she was found guilty in a civil trial on six counts of corruption and willful misconduct related to the permit exchange scheme.

Before serving as Palo Alto’s police chief, Jonsen served as the Menlo Park chief of police and spent some 27 years working in the Los Angeles County Sheriff’s Department before retiring as a captain.

Jensen retired from the Santa Clara County Sheriff’s Office in 2013. Before that, he had worked in assorted roles across the county jail system and the Sheriff’s Office for three decades.

Roughly half of the county’s votes remained untallied as of Tuesday night, according to the county’s Registrar of Voters.