On her Facebook page, Ms. Bruner called Mr. Obama “Ahab the Arab,” and wrote that he “hates all white people and all wealthy people because to him wealthy means white.” Although she condemned the Ku Klux Klan in one posting, she wrote positively of its roots, writing that it started “as citizens trying to fight back against a corrupt government when there were corrupt officials or no officials at all to keep law and order in the rural areas.” Of Mr. Obama’s youth, she wrote: “I heard from a reliable source that Obama was also a male prostitute for a while when he lived in New York with his male ‘partner.’ How do you think he paid for his drugs?”

Nearly all of her Facebook posts have been removed from public view, but they have been collected and publicized by her critics, including the Texas Freedom Network, a nonprofit group that advocates religious freedom in the classroom and monitors the activities of far-right organizations.

Ms. Bruner declined a request for an interview. “The newspapers are not interested in doing anything nice to me, and so I’m not interested in giving them ammunition that they can twist and use against me,” she said. “I don’t know why I’m getting so much attention. I’m just saying what I believe and what the people of my district agree with.”

Mr. Ellis, her opponent, disputes Ms. Bruner’s claim that the district shares her views. “That hate-filled speech that she has is not conservative, it’s not Christian,” he said.

Yet some Republicans have rallied around her, arguing that her social media postings do not disqualify her from sitting on the State Board of Education. “I believe, like Benjamin Franklin said, stand on principle even if you stand alone,” said John E. Tweedell, 85, who lives in the nearby city of Hideaway and endorsed Ms. Bruner. (The saying is credited to John Adams.)

“If she’s standing alone, she’s standing on her principles, and for that I admire her.”

Mr. Tweedell and other Republicans who said they voted for Ms. Bruner had not read her Facebook posts. Even the group that was instrumental in her victory in the primary, Grassroots America — We the People, an influential Tea Party organization that gave her a dual endorsement with another candidate, appeared to be caught off guard. “We were not aware of Ms. Bruner’s social media postings, and we do not agree with them,” the group said in a statement.