SACRAMENTO, Calif. (AP) — Republican Nathan Hochman will battle California’s Democratic Attorney General Rob Bonta in the November general election after garnering 18% of the vote in the primary, according to figures released Thursday.

Hochman, the Republican Party’s endorsed candidate, will face Bonta in a state that overwhelmingly favors Democrats. Bonta, the only Democrat in the five-way field, won 54.8% of the June 7 primary, according to the latest figures from California’s secretary of state.

READ MORE: Getting Answers: What Do Increased Releases From Folsom Dam Mean For Region's Water Levels?

Under state law, the top two vote-getters advanced to the November election, no matter their party affiliation.

Conservative Republican Eric Early was close behind Hochman with 16.4% of the vote but had no chance of catching up because there weren’t enough uncounted ballots to tip the balance.

Sacramento County District Attorney Anne Marie Schubert, running without party affiliation, got 7.7% of the vote. Green Party candidate Dan Kapelovitz had 3.2%.

READ MORE: 'This Isn't Going To Hold Us Back': Drag Event In Woodland Stopped Over Alleged Threats Of Violence

Hochman is a former federal prosecutor, defense lawyer, a former assistant U.S. attorney general. He and the other GOP candidates have focused on concerns by Californians about rising rates of crime and other problems.

“Californians are done tolerating fearless criminals, our downward spiraling homelessness crisis, and fentanyl ravaging our cities,” Hochman said in a statement Thursday.

Hochman also had grounded his campaign on fighting human trafficking, including by backing a stalled bipartisan bill that would label it a violent felony. He also proposed to coordinate prosecutions of traffickers statewide, seize their assets and begin a statewide human trafficking education campaign.

MORE NEWS: California Lawmakers Demand Accountability After Personal Info Of Concealed Weapons Holders Leaked

Bonta, who was appointed by Gov. Gavin Newsom last year to fill a vacancy, is expected to easily win the November election. California’s last Republican attorney general left office in 1999 and the party hasn’t won a statewide election since 2006.