A judge in Texas recently resigned by accident after he publicized his intention to run for the state's Supreme Court.

Democrat William "Bill" McLeod has served as a judge in Harris County Civil Court at Law Number Four since January. Thinking of the future, McLeod posted online his plans to run for the state's highest court.

NORTH CAROLINA GOP CHAIRMAN, OTHERS INDICTED ON BRIBERY AND FRAUD CHARGES

He told KHOU that soon after, someone showed him the Texas Constitution, specifically Article 16, Section 65, which applies to district and county clerks, county judges, and judges of county courts at law, among other positions.

The law states that if any of those holding the aforementioned offices announce their candidacy for another office or become an actual candidate, "such announcement or such candidacy shall constitute an automatic resignation of the office then held."

McLeod declined an interview with the news station but did plead on Facebook on Sunday for supporters to help him.

"There has been a discussion and a issue with a potential violation ... with the Texas Constitution, and I am in dire need of people's support."

The judge said that County Attorney Vince Ryan "is trying to throw me off my bench because of this potential violation," and added he has "no intention" to run for the Supreme Court.

Ryan will present the issue to a meeting of the county commissioners on Tuesday, according to the report. McLeod has asked for his supporters to call the commissioners and show their support.

CLICK HERE TO GET THE FOX NEWS APP

One of his supporters, Kandice Webber, said the incident "would not be the first time that a judge has made a mistake."

"Our judges are human," she told KHOU. "I would beg the court to leave him where he is. This is where Houstonians want him. This is where Harris County wants him, and we made that very loud and clear at the ballot.”