Donald Trump's musings about running for president as a third-party or independent candidate have struck fear into the hearts of many Republicans, since he could well split the conservative vote and throw the election to the Democratic nominee.

Unless, that is, he's blocked from even appearing on the ballot by "sore loser laws."

Already in Ohio and Michigan, existing sore loser laws would block a Trump third-party bid if he runs in the primaries and loses. And if Republicans pass similar measures in other swing states, the damage from a third-party or independent Trump candidacy could be contained.

It's a sort of nuclear option that the party could take in a last-ditch effort to stop Trump from tanking their presidential chances. But he certainly wouldn't go down quietly. As Ezra Klein recently wrote, "There's nothing Donald Trump hates like being called a loser."

What is a sore loser law?

Sore loser laws block someone who runs and loses in a party primary from running in the general election as the candidate of another party, and/or as an independent, depending on the wording. These laws are essentially meant to protect the major parties' prerogatives, and to prevent divisive primary splits from carrying over to the general election. Yet they've also been criticized for bolstering the dominance of the two party system, and for restricting voters' options.

According to an article by Emory law professor Michael Kang, 47 states have some form of a sore loser law on the books, the language and severity of which vary. (Some merely block third-party bids; others apply to independent or even write-in candidacies.) Luckily for Trump, though, only a few of these state laws actually apply to presidential elections.

One of the few that does, however, is in the hugely important swing state of Ohio. And according to its secretary of state — Republican Jon Husted — Trump has already disqualified himself from running as a third-party or independent candidate there. Husted said last week that Trump's participation in the Republican debate and his FEC statement of candidacy are enough to do the trick, as USA Today's Paul Singer wrote.

That's a stronger interpretation than several other states, where you have to actually appear on the ballot to lose your third-party option. Theoretically, Trump could skip the Ohio primary or file for the ballot but withdraw. If he does decide to take this route, he'll surely contest Husted's interpretation of the law in court.

Another option — running as a write-in candidate — wouldn't work in the state. Ohio law says write-in votes will only be counted if they're for people who have filed a declaration of intent to be a write-in candidate, which the sore loser law prevents Trump from doing.

Michigan's sore loser law could also trouble Trump. Back in 2012, Gary Johnson ran for the Republican nomination, but planned to run on the Libertarian Party ballot in the general election. But Johnson failed to withdraw his name from the GOP primary contest in time — he was three minutes too late in filing his request. As a result, and despite a legal battle, he was blocked from appearing on the ballot in the general.

Would Republicans in other states pass sore loser laws to stop Trump?

If Trump continues to dangle the possibility of an independent candidacy, Republicans in other key states could pass similar sore loser laws applying to the presidential contest. Such a blatant anti-Trump move would likely result in some backlash, but party elites might calculate that it's worth doing anyway, since Trump puts their presidential chances at such risk. In Florida, Wisconsin, and Nevada, the governorship and state legislature are all in Republican hands (though it might be awkward for Wisconsin Gov. Scott Walker to sign such a law, considering he's running for president himself).

But if the GOP makes such a move, expect many Democrats to suddenly wax loquacious about how undemocratic sore loser laws are for their own partisan reasons. Virginia's governor is Terry McAuliffe, a longtime close ally of the Clintons. Colorado, New Hampshire, and Pennsylvania have Democratic governors, too, and Iowa's state Senate is (barely) controlled by Democrats. They have little incentive to do the GOP presidential candidate a favor.

Republicans could accurately make the case that in the long run, both major parties will be helped by sore loser laws. But the potential short-term benefits of a Trump independent candidacy could be so great for Democrats that it would be a tough sell.

VIDEO: Donald Trump on his willingness to run as a third party candidate