Donald Trump’s threat to run as an independent lost some potency in recent days, with both Texas and Ohio officials indicating that’s not going to happen in either state.

Monday marked the deadline in Texas for candidates to finalize their party affiliation, and Trump, who previously filed as a Republican, is now prohibited under state law from appearing on the ballot in 2016 as an independent.

Not everyone agrees that particular segment of the state’s election code would withstand a court challenge, but state election officials told InsideSources Monday that as far as they’re concerned, Trump is a Republican for the 2016 election cycle in Texas.

The GOP front-runner faces a similar “sore loser” rule in Ohio, where Trump filed to run as a Republican on Friday. Ohio election officials said state law now prohibits the New York real estate mogul from appearing on the general election ballot as anything other than a Republican.

“Since Donald Trump has filed a declaration of candidacy with our office as a Republican, has filed with Federal Election Commission as a Republican candidate, and voluntarily took part in the Republican presidential debates, the first of which was held in Ohio, there is no way for Mr. Trump to disaffiliate from the Republican Party ‘in good faith’ during this election cycle,” an official in Secretary of State Jon Husted’s office told the Cleveland Plain-Dealer.

Sore loser laws are meant to prevent losing primary candidates from torpedoing party nominees in the general election by siphoning off votes with doomed third-party bids.

That’s essentially what Trump has threatened since getting into the GOP presidential race last summer, warning Republican officials across the country he would run as an independent if he feels he is treated unfairly by the party establishment.

Speculation about a third-party bid ramped up again in the past week as Trump slipped behind Sen. Ted Cruz in a couple of new Iowa polls and GOP officials held a quiet meeting in Washington to discuss the possibility of a floor fight for the Republican nomination at next summer’s convention.

The Dec. 7 meeting, which included Senate Majority Leader Mitch McConnell and Republican National Committee Chairman Reince Priebus, according to reports, included discussion of convention strategies that would allow delegates to coalesce around an alternative to Trump, who has alienated GOP leaders in Washington with his comments on immigrants and refugees.

After the story broke in The Washinigton Post, party officials insisted the meeting — which included allies of former Gov. Jeb Bush and Sen. Marco Rubio, two of Trump’s rivals for the GOP nomination — was a routine session, not an attempt to undermine Trump or other “outsider” candidates like neurosurgeon Ben Carson.

Carson has also warned GOP officials to play fair.

“If this was the beginning of a plan to subvert the will of the voters and replace it with the will of the political elite, I assure you Donald Trump will not be the only one leaving the party,” Carson said last week.

Trump signed a pledge earlier this year vowing not to run as an independent and support the party’s eventual nominee, but has since refused to rule out an independent bid.

“If they don’t treat me with a certain amount of decorum and respect. If they don’t treat me as the front-runner … If the playing field is not level, then certainly all options are open,” Trump told CNN recently.

Those options include court challenges that, despite what Texas and Ohio officials say, would likely put Trump’s name on the general election ballots in all 50 states, according to some legal scholars.

Richard Winger, editor of Ballot Access News, told InsideSources that American courts generally rule in favor of more ballot access, not less.

“There have been 13 people in history who ran in major party presidential primaries and then got on the ballot outside major parties,” Winger said. “No third party or independent candidate has ever been kept off a general election ballot because of running in a presidential primary until 2012, when Michigan kept Gary Johnson off its general election ballot as the Libertarian. And even then Michigan admitted he was free to be an independent candidate. But they didn’t think he could be the Libertarian because he had run in Michigan’s Republican presidential primary.”

Even if Trump loses a court challenge to the Texas and Ohio laws, there are ways around the restrictions, Winger said — running a proxy candidate, for example, whose Electoral College votes would go to Trump.

Gaining access to the ballots in all 50 states isn’t even the most difficult part of running as an independent, Winger said: “The debate problem is a bigger problem than ballot access.”

Winger and other advocates for a more open electoral process say the key for a successful independent candidate is participating in next fall’s nationally-televised general election debates — debates controlled by the Republican and Democratic party insiders who sit on the Commission for Presidential Debates.

“The problem is not ballot access. The problem is the CPD,” said Cara Brown McCormick, president of Level the Playing Field, an advocacy group that is part of a lawsuit seeking more third-party participation in the debates.

“Unfortunately you have no chance of ever becoming president as the Libertarian Party nominee, or as the Green Party nominee for that matter, or whoever the party is,” she told InsideSources. “If you’re not on that debate stage in the fall, you are not going to become president.”