The woman, Mary Lou Bruner, 69, a former kindergarten teacher, had used her Facebook page to post her extreme views on politics and education. Ms. Bruner called the Boy Scouts “a homosexual organization” and declared that because of her conservative views, Mr. Obama “has had me investigated.” She encouraged parents to home-school their children because that was “the only way you can be in control of what they are taught,” and claimed that school shootings across the country had begun “after the schools started teaching evolution.”

Her postings drew national attention as she campaigned for a seat on the State Board of Education, the 15-member body that sets curriculum standards, adopts textbooks and establishes graduation requirements in Texas public schools. In March, Ms. Bruner earned the most votes in the Republican primary, winning 48 percent, but failed to get enough votes to avoid a runoff.

On Tuesday, Ms. Bruner was defeated by a wide margin by Keven M. Ellis, 45, a chiropractor who is the president of the school board in Lufkin. Because Republicans dominate the district, the winner of the Republican race is expected to beat the Democrat — Amanda M. Rudolph, a professor at Stephen F. Austin State University — in the general election.

“The voters did their homework,” Mr. Ellis said in a statement as he declared victory.

Ms. Bruner never backed away from her remarks on Facebook. “I’m just saying what I believe and what the people of my district agree with,” she said when she declined an interview with The New York Times in March.

One of her biggest critics, the nonprofit Texas Freedom Network, which collected and publicized her Facebook statements, said on Tuesday, “Texas escaped an education train wreck tonight.”