Democrat Nathan Johnson has been elected Texas attorney general, defeating Republican Mayes Middleton, according to The Associated Press race call.
The election determines who will succeed Ken Paxton, who chose to run for U.S. Senate after more than a decade as attorney general.
Middleton, a Republican state senator, won his party’s nomination after defeating U.S. Rep. Chip Roy in the May primary runoff.
Johnson, also a state senator, secured the Democratic nomination.
The attorney general serves as Texas’ chief legal officer, representing the state in civil litigation, defending state laws and issuing legal opinions on questions of state law.
The office frequently plays a significant role in disputes involving the federal government and challenges to state legislation.
The winner will take office in January 2027.