Assemblyman Tony Thurmond, D-Richmond, declared victory Saturday in the close, costly and contentious race to become the next state superintendent of public instruction.

Thurmond said in a tweet that his chief rival in the race, Marshall Tuck, had called to congratulate him.

“I intend to be a champion of public schools & a Superintendent for all CA students,” Thurmond tweeted.

Tuck, a charter school executive, eked out a narrow lead on election night, but Thurmond steadily chipped away at it. On Saturday afternoon, Thurmond led by about 150,000 votes, 50.8 percent to 49.2 percent.

I want to thank the voters of CA for electing me to serve the 6 million students of CA. I intend to be a champion of public schools & a Superintendent for all CA students. I want to thank Marshall Tuck for his gracious call to congratulate me & wish me well. Time to get to work! — Tony Thurmond (@TonyThurmond) November 17, 2018

The tight race saw a record level of spending — more than $50 million. Tuck attracted deep-pocketed education reformers, including Gap co-founder Doris Fisher and philanthropist Eli Broad. A representative from Tuck’s campaign did not immediately respond to requests for comment.

In addition to overseeing the state Department of Education, which administers the $93 billion education budget, the superintendent sits on the governing boards of the University of California and California State University systems, and of the $219 billion teachers’ pension fund.

Dominic Fracassa is a San Francisco Chronicle staff writer. Email: dfracassa@sfchronicle.com Twitter: @dominicfracassa