Democrat Alex Padilla overcame an early deficit to beat his Republican rival in the race to become California's elections chief.
With 100 percent of precincts reporting, Padilla had 52 percent of the votes to Republican Pete Peterson's 48 percent.
In the first several hours after polls closed, first-time candidate Peterson had held a slight lead — a result that if it held up would have given Republicans a rare win in a deeply Democratic state. But that began to turn late Tuesday, as votes from heavily Democratic areas including Los Angeles County rolled in.
"Obviously, L.A. is a beast," Peterson said.
Padilla has represented Los Angeles for the past eight years as a state senator.
The secretary of state is responsible for organizing statewide elections, regulating political fundraising and overseeing business registration. Democratic incumbent Debra Bowen is termed out.
Peterson and Padilla shared many campaign themes, with both saying they want to increase voter turnout, use technology to improve civic participation and make it easier to start a business.
"The business registration process takes too long currently," Padilla told KPCC's Steve Julian in an interview Wednesday morning. "And we also want to make sure we embrace new technologies and strategies to bring convenience to the voter registration process and the experience of actually casting a ballot."
Padilla entered politics soon after graduating with an engineering degree from the Massachusetts Institute of Technology. During his two terms in the state Senate, where he is being termed out, he wrote laws allowing driverless cars on California roads and banning single-use plastic shopping bags.
Padilla told voters that experience would help him accomplish his goals if elected; Peterson tried to peg Padilla as a Sacramento insider and said he had hands-on experience for the job as executive director of Pepperdine University's Davenport Institute for Public Engagement and Civic Leadership.
Peterson left a career in the printing industry to study and then try to fix what he sees as a broken bond between the public and government. He describes himself as a limited-government Republican and believes California needs to invest more heavily in boosting civic engagement.
As if to emphasize that issue, the Field Poll projected that just 46 percent of registered voters would turn out for Tuesday's election — and turnout was certainly low, though final numbers were not yet available.
This story has been updated.