Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

A retired Texas schoolteacher who received national attention for her outrageous conspiracy theories and claimed President Obama was once a gay prostitute was denied a spot on the state board of education Tuesday.

Only several months ago, Mary Lou Bruner, 69, of Mineola, Texas, had been the front-runner for the powerful seat on the Texas State Board of Education, the second-largest school system in the nation.

But as conspiracy theories in Bruner's old Facebook posts surfaced, her lead shrunk. Voters ultimately chose fellow Republican Keven Ellis, a local school board president, for the GOP nomination. Bruner lost by about 18 percent in the primary runoff.

Mary Lou Bruner, 69, Candidate for State Board of Education, District 9. Rachel Rutledge / The Northeast Texan

Bruner's Facebook posts, which have since been deleted, ranged from the biblical to bizarre. The posts went back several years and were published by left-leaning government watchdog group Texas Freedom Network.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

In one, she wrote that a flood from Noah's Ark destroyed dinosaurs — not a meteor invented by atheists.

In another, she claimed Democrats killed John F. Kennedy. And in one of multiple anti-Islam comments, she said House Speaker Paul Ryan's beard made him look like "a terrorist."

“Texas escaped an education train wreck tonight."

She also took swings at Obama, claiming he spent years as a prostitute in his twenties, which she claimed enabled him to pay for drugs and explained why he now has a "soft spot for homosexuals."

Her defeat was celebrated by the group that had outed her Facebook posts.

“Texas escaped an education train wreck tonight," Texas Freedom Network President Kathy Miller said in a statement. "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."

Bruner was an elementary and special education teacher for 36 years. During her campaign for the 15-seat state school board that oversees the education of 5 million students, she vowed to restore "traditional" educational values to Texas' public schools, including keeping gay "subliminal messages" out of textbooks, according to The Dallas Morning News.

"We need to stick with the basics of teaching phonics, cursive writing, English grammar and multiplication tables," she told Reuters. “I stand for truth in education, not political correctness.”

Her Facebook posts came to light after the primary in March, where she nearly ran outright, but fell short of the 50 percent of votes needed to avoid a runoff. Her campaign lost even more steam after an influential Tea Party group dropped its endorsement of her.

Ellis, who won the nomination on Tuesday, is favored to win in November in the conservative East Texas district, NBCDFW.com reported.