A family law attorney running for a Pinellas-Pasco circuit judgeship said he can be impartial on the bench to Muslims and LGBTQ people — despite the derogatory social media posts he has written about both groups.

Donald McBath logged onto his Twitter account on Feb. 26, 2017, and wrote: "never trust a Muslim."

Then on March 25, 2017, he tweeted: "Muslims are deranged!!!!"

This year, he took to Facebook on Feb. 25 and wrote that Jesus condemned gay people:

"If the homosexual continues committing that sin of sodomy, his soul faces ETERNAL damnation," wrote the 61-year-old attorney and grandfather. "Abstain, if you really have that mental illness. It's not love."

McBath acknowledged to the Tampa Bay Times that he wrote those posts but said his personal beliefs should be considered separately from his judicial campaign.

When asked if he could treat Muslim and LGBTQ citizens fairly were they to appear in his courtroom, McBath said he could.

"I absolutely can still be fair no matter what kind of beliefs that I may have," he said. "We all have our own personal beliefs based on what's happened in our lives, and as long as it doesn't interfere with how we treat a person, that's the goal."

Stetson University College of Law professor Louis Virelli III, who studies judicial bias, said McBath's social media history raises issues that voters should consider when they go to the polls in August.

He said it's "terribly bad form to elect a judge who has committed to strong negative feelings about an entire segment of the population that he or she is going to be responsible to administer justice to."

Virelli studies recusals, which are when a judge abstains from a case because of a conflict of interest. He said Muslim and LGBTQ litigants could request that McBath recuse himself from their case if they believe his comments show that he cannot be fair or impartial.

"It is going to put a strain on the system," said Virelli, who wrote a book about U.S. Supreme Court recusals. "I can't imagine a Muslim litigant or lawyer would not take seriously the prospect of a recusal motion if these statements are true and if they reflect the judge's thinking, and there's no reason to believe that they don't."

He pointed out that judges are bound by the Equal Protection Clause in the U.S. Constitution, which bans discrimination based on religion, ethnicity and gender. It does not, however, protect the LGBTQ community to the same extent.

If McBath is elected, lawyers who find themselves in his courtroom will undoubtedly raise those issues.

"They are going to be making arguments and presenting evidence that his prior statements indicate he isn't inclined to believe them based on who they are," Virelli said.

Advocates for the Muslim and LGBTQ communities said they also don't believe that McBath could treat either group fairly.

"Don McBath has revealed himself to be incapable of treating the LGBT community with dignity and respect," Equality Florida executive director Nadine Smith said after reading the Feb. 25 Facebook post. "He lacks the temperament required of a judge to deal impartially with the facts."

Thania Diaz Clevenger, the civil rights director for the Council on American Islamic Relations Florida, said the comments are "jarring and revealed a very clear bias and certainly a lack of judgment on his part."

"It's certainly going to raise a lot of red flags for those who appear before him," she said.

When asked why he believes Muslims can't be trusted or are "deranged," McBath declined to elaborate.

"I can't really go into detail in regard to those comments that were made from a personal standpoint," he said.

He is running against Pinellas-Pasco prosecutor Doneene Loar to replace retiring Circuit Judge Frank Quesada. The annual salary for the job is $160,688. Pinellas and Pasco voters will decide the race in the Aug. 28 primary.

Instead of his personal beliefs, McBath said voters should consider his more than 25 years of legal experience.

His resume says he obtained his law degree from Western Michigan University's Cooley Law School and is a former Army major who served in Operations Desert Shield and Storm. His career has focused mostly on marital and family law. His resume says he enjoys "doing a deposition of an opponent in a family law case."

It also says he serves as a lector at Our Lady of the Rosary Catholic Church in Land O'Lakes and enjoys cruises, the beach and playing golf.

"There's so many things that I'm proud of in regards to things that I've done in regards to my legal experience, in my military experience, education, the awards, the social and professional activities that I participate in," he said. "Those far outnumber anything that somebody could construe as negative."

In a followup text message to the Tampa Bay Times, McBath emphasized that he did not want his beliefs to be misconstrued:

"Let me make it more clear. Jesus condemned sodomy!!!!"