Editor's note: This story has been updated throughout.

In a stunning comeback, State Board of Education hopeful Keven Ellis won Tuesday's District 9 Republican primary runoff over Mary Lou Bruner, who drew national attention for social media posts touting far-right conspiracy theories and other fringe views.

The East Texas Tea Party activist and former schoolteacher had been favored to succeed in the race after nearly winning the March 1 primary outright and accumulating heavy support from influential conservative groups that typically hold big sway in low-turnout runoff elections. But Ellis, a Lufkin chiropractor who presides over the local school board, maintained a double-digit lead over Bruner throughout Tuesday night, and that lead widened as vote returns rolled in.

He ended the night 18 points ahead of Bruner, with the final vote showing Ellis hauling in 36,842 votes, 59 percent, to Bruner’s 25,420, according to complete but unofficial returns.

Ellis’ victory all but ensures his ultimate election to the 15-member state panel that reviews and approves textbooks and sets curriculum standards for the state's more than 5 million public school students. District 9, a 31-county swath spanning northeast Texas, is a deeply conservative Republican stronghold. (Democrat Amanda Rudolph, a Stephen F. Austin State secondary education professor who was unopposed in her primary, will appear on the general election ballot in November.)

The 45-year-old's win comes after Bruner nearly won a three-way GOP primary race March 1, falling less than 2 percent and a few thousand votes short of the 50 percent mark. (Ellis got 31 percent of the vote.) Her strong showing came despite extensive media coverage of her then-public Facebook posts, one of which said she had heard from a reliable source that President Obama worked as a gay prostitute while in his 20s to fund a drug habit.

With Texas GOP runoffs typically drawing the most conservative voters, Rice University political scientist Mark Jones had previously named the 69-year-old from Mineola a favorite to win the runoff while acknowledging a scenario where educators turned out in droves to vote against her.

"It would appear that a perfect storm occurred to defeat Bruner," Jones said in an email Tuesday night. "Superintendents and teachers (and their friends and families) across the district rallied against her due to disagreement with her positions on education policy, the belief she would not be a good representative of the district’s interests, and the embarrassment they felt her election would bring to the region."

Ellis said he felt “really confident that the educators turned out and voted.”

“They saw the importance of this,” he said. “They saw who I was and they saw who my opponent was and they made the right decision.”

Bruner did not immediately return a call seeking comment.

Jones also noted the possible impact of a recent decision by an influential Tea Party group, Grassroots America — We the People, to withdraw its previous endorsement of Bruner, who worked in East Texas schools for 36 years, citing inaccurate statements she had made on the campaign trail and an apparent unwillingness to issue a statement correcting them.

In a recent speech to East Texas superintendents, for example, Bruner claimed that half of all public school students were in special education. It was the first time the group has ever rescinded support for a candidate, according to Executive Director JoAnn Fleming.

“Texas escaped an education train wreck tonight,” said Kathy Miller, president of the Texas Freedom Network, a left-leaning group that monitors the State Board of Education. “If Bruner had ultimately won election to the board, she would have instantly become the most embarrassingly uninformed and divisive member on a board that already too often puts politics ahead of making sure our kids get a sound education.”

Ellis wasn’t the only State Board of Education hopeful to score a turnaround Tuesday.

Dakota Carter, a child and adolescent psychiatry resident at the University of Texas Health Science Center in Houston, defeated Jasmine Jenkins in the District 6 race’s Democratic runoff.

The former fourth-grade bilingual teacher, who received her doctorate in education and now manages community-based initiatives at Advantage Testing of Houston, won 44 percent of the vote March 1 to Carter’s 32 percent.

But by late Tuesday, Carter had secured 62 percent of the vote to Jenkins’ 38 percent, with 78 percent of precincts reporting.

The Panhandle native will face education board chairwoman Donna Bahorich in the November general election.

Disclosure: Rice University has been a financial supporter of The Texas Tribune. Find a complete list of donors and sponsors here.