The Texas Republican Party is suing the Texas secretary of state over U.S Rep. Blake Farenthold’s appearance on the March primary ballot.

A federal judge is scheduled to hear the case Tuesday morning in an Austin court. The suit was filed late last week.

Days after filing for re-election, Farenthold announced on Dec. 14 he would not run again, amid accusations of vulgar behavior in his office. His announcement came after the deadline to withdraw from contention for the March 2018 primary.

“I allowed a workplace culture to take root in my office that was too permissive and decidedly unprofessional,” he said in the video statement posted to his campaign Facebook page. “It accommodated destructive gossip, off-hand comments, off-color jokes and behavior that in general was less than professional.”

“I allowed the personal stress of the job to manifest itself in angry outbursts and too often a failure to treat people with the respect that they deserved,” he continued. “That was wrong. Clearly, it’s not how I was raised, it’s not who I am and for that situation, I am profoundly sorry.”

The issue at the heart of the lawsuit is Section 172.052 of the Texas Election Code, which says, “A candidate for nomination may not withdraw from the general primary election after the first day after the date of the regular filing deadline for the general primary election.” In Farenthold’s case, that would have been Dec. 12.

A Texas GOP spokesperson declined an interview request at the advice of counsel, but chairman James Dickey said in a statement that the party “ believes it’s in our best interest to accommodate his request and remove him from the ballot.”

“Unfortunately, there are provisions in Texas law that interact to prevent this from happening,” Dickey’s statement said. “With this filing we are asking a federal court to resolve this issue and achieve the common-sense result that all parties want and that respects our right of freedom of association.”

If the court rules in favor of the state party, Farenthold’s name would come off the ballot, leaving six other Republicans to vie for his seat in the primary. Should the legal challenge be struck down, there are basically three scenarios that could play out.

First, his application could be challenged by another candidate, citing Sec. 141.034, which stipulates the application “does not comply with the applicable requirements as to form, content, and procedure.” That challenge would have to be completed before “the day before any ballot to be voted early by mail is mailed to an address in the authority’s jurisdiction for the election for which the application is made.” Round one of military and overseas ballots go out Jan. 20.

“It’s very unusual for someone to get removed from the ballot once they are on the ballot,” Joshua Blank, manager of polling and research for the Texas Politics Project at the University of Texas at Austin, said.

Scenario two involves a possible primary runoff. The top two vote-getters move on to a head-to-head challenge, but with half-a-dozen other Republicans in the race, there is a chance that no one candidate receives the majority required (more than 50 percent) to win the primary outright. Sec. 172.059 allows a candidate to withdraw by “5 p.m. of the third day after the state canvass…” meaning that after the runoff is announced, a candidate can decide to bow out, leaving the remaining candidate as the nominee.

“There’s even a possibility that he wins that race without actually desiring to win it which is really what the Republican Party is seeking to avoid,” Blank added, which is the focus of the third scenario.

If the candidate wins outright, Sec. 145.035 allows for that person’s name to be taken off the ballot, “if the candidate withdraws, dies, or is declared ineligible on or before the 74th day before election day.”

However, that candidate may only be replaced with a new name for the general election if a candidate falls “critically ill,” if there are no other nominees from other parties, or if the candidate was elected or appointed to another office.

“The reality is is that the Republican Party might be in a difficult position if Farenthold were to make it through to the general election” Blank added. “The party doesn’t really have control over who the nominees are. And you could see that in Alabama, you can see it in the 27th district here in Texas. In the end they’re going to have to basically deal with the hand that they are dealt. They are trying to impact that before it happens, but it’s not really up to them, it’s up to the primary voters.”

Meanwhile, the Texas Democratic Party said Farenthold’s attempt to bow out was a “PR stunt,” and not enough. Executive Director Crystal K. Perskins called for Farenthold to “immediately leave office for his vile behavior.”

“Republican Blake Farenthold has no business holding public office,” Perkins said in a Dec. 14 statement. “The fact is, Farenthold has violated the public trust and shown a pattern of demeaning, degrading, and disrespectful conduct towards women.”

Texas Secretary of State Rolando B. Pablos is listed as the defendant because it is his office that is in charge of administering the elections in Texas. His office was unable to publicly comment due to the pending litigation.

U.S. Rep. Blake Farenthold (R- Texas, 27th District) surveys damage in Rockport days after Hurricane Harvey. (Nexstar Photo/Wes Rapaport)