A federal appeals court ruling has lifted the veil on months of legal jockeying in the upcoming criminal trial of West Virginia coal baron Donald Blankenship.

Blankenship, the former CEO of one-time coal giant Massey, allegedly conspired to systematically skirt safety regulations in the company’s mines, ultimately resulting in the April 5, 2010 explosion at the Upper Big Branch mine in Montcoal, W.Va., that killed 29 miners.

The explosion was caused when a sparks from a longwall shearer ignited a pocket of methane, generating a fireball that caused a second, more deadly explosion when it traveled down the mine and hit a bunch of coal dust. That blast tore through two and a half miles of mine, killing 29 of 31 men working in the area. State and federal investigators blamed Massey and a culture of skirting mining safety regulations.

A grand jury indicted Blankenship in November on four charges: conspiring to willfully commit routine violations of federal mine safety laws; conspiring to impede administration of the federal mine safety laws; making false statements to the Securities and Exchange Commission (SEC) in the wake of the explosion; and securities fraud. If convicted, he faces 31 years in prison.

But documents made public for the first time Thursday suggest that Blankenship, who has famously avoided prosecution for past misdeeds, has no intention of serving that time. At the least, he’s going to put it off as long as possible.

The documents, released after media organizations challenged a court-instated gag order on the case, show a Blankenship defense team bent on throwing whatever obstacles it can — requesting delays, a venue change, an entirely new set of circuit judges, and the kitchen sink — into the prosecution’s way. Prosecutors filed responses to each, and the thrust and parry between the two sides demonstrates a months-long process of legal one-upsmanship that occasionally descended into snide digs from both sides.

One motion from the defense seeks to dismiss the four charges against Blankenship on the basis of “selective and vindictive prosecution.” Essentially, Blankenship’s lawyers claim that in the months following the Upper Big Branch explosion, the U.S. Attorney’s Office repeatedly told him he was not a target in its investigation. That changed, the defense claims, after Blankenship released a film called Upper Big Branch – Never Again, which accused the federal Mine Safety and Health Administration of forcing a subpar ventilation on the mine and blamed the explosion on the unexpected release of natural gas in the area. The defense claims charges against him came as a result of the film and therefore violate his First Amendment rights.

Federal prosecutors dismissed the claim that they’d charge Blankenship “because of a Youtube video” as “incredible,” citing a series of prior cases brought against Massey and its subsidiaries, including one case against a former Upper Big Branch employee who pleaded guilty to faking a foreman’s license during mine safety inspections and lying to inspectors (the employee was transferred from Upper Big Branch before the explosion).

If he must face trial, Blankenship’s defense team wants it to take place outside the Southern District of West Virginia. The motion to change venue still isn’t available, but the federal prosecutors’ response is. That response refers to a survey in Beckley, W.Va., where the trial is scheduled to take place, and a collection of news stories that Blankenship’s lawyers say proves he can’t get a fair trial. In response, prosecutors cite the case of Enron’s former CEO Jeffrey Skilling and argue that the defense’s claims “show less evidence of pre-trial prejudice than existed in Skilling [v. United States] where no venue change was required.”

If the trial must remain in Beckley, Blankenship’s lawyers seek the disqualification of all the judges within the Southern District of West Virginia. The reason? The district’s U.S. attorney, Booth Goodwin II — who, allege the lawyers, “committed serious misconduct both in deciding to prosecute Mr. Blankenship, a public figure in West Virginia, and in misrepresenting to the grand jury the law and the facts of the case” — is the son of a judge in the district. Blankenship’s lawyers therefore argue that other judges will be biased due to their presumed friendship with Goodwin’s father.

Prosecutors respond that imputing one judge’s conflict to every other judge on that court is “unprecedented” and ridiculous.

They are particularly ridiculous when you consider Blankenship’s history with the courts. And to understand that, it helps to know a little bit about the man himself.

The title of Blankenship’s website, “American Competitionist,” hints at his personality and motivations. Blankenship grew up dirt-poor in southern West Virginia, where his mother worked 80 to 90 hours a week running a gas station and convenience store. He studied accounting at Marshall University and worked for a decade before moving to the coal industry in 1982, when he was hired by a Massey subsidiary. He won his reputation waging a battle against the United Mine Workers to de-unionize a mine. Blankenship won the PR battle after the dispute turned violent. Many credit his victory as the beginning of a national downtown for the UMW that continues to this day.

As he rose through the ranks at Massey, Blankenship built a reputation as an aggressive capitalist, always looking to cut costs, squeeze competitors, and press his advantage by whatever means necessary. By 1992 he was named president and chair of the board for Massey, and by 2000 he became CEO.

Massey became the largest coal producer in Appalachia and the fourth largest in the U.S. Under Blankenship, the company aggressively pursued mountaintop removal, ripping apart landscapes to get at the coal buried beneath. As environmentalists squealed in protest, Blankenship labeled them “greeniacs” and began speaking out against them, helping innovate some of the talking points still used today by Appalachian politicians offended by the “war on coal.” Not coincidentally, Blankenship took an interest in Republican politics and helped start West Virginia’s tilt toward the GOP — a move that the aforementioned “war,” and President Obama’s unpopularity within the region, accelerated.

Blankenship’s strongarm tactics, however, didn’t win him notoriety as “The Dark Lord of Coal Country” until Hugh Caperton, who ran a small mining company, took Massey to court, alleging that it had twisted the law to force his company into bankruptcy. When the jury awarded Caperton $50 million, Blankenship’s legal team appealed the ruling to the West Virginia Supreme Court.

While the case straggled to its hearing, Blankenship took advantage of the fact that West Virginia elects its judges, spending $3 million to help a Republican challenger unseat a Democratic incumbent on the West Virginia Supreme Court, shifting its make-up in his favor. Despite Blankenship’s hefty investment, the newly elected judge declined to recuse himself and was part of a 3-2 majority that overturned the original jury decision. After photos emerged of another supreme court justice wining and dining with Blankenship on the French Riviera, the case was kicked up to the U.S. Supreme Court, which called for a redo. Despite that outcome, Blankenship somehow still won out, and Massey never did have to pay the $50 million originally awarded.

All of this created the impression that Blankenship was somehow above the law, especially in a state with an economy so reliant on coal. That impression was strengthened after the Upper Big Branch mine disaster, as four-and-a-half years passed with no legal repercussions for Blankenship. That ended with November’s indictment.

While prosecutors and the defense continue their fencing match in Blankenship’s criminal trial, he remains active in other court cases too. Last month, he sued Alpha Natural Resources, the company that bought out Massey in 2011 (but only after Blankenship retired as CEO the prior year). Blankenship’s suit alleges that Alpha agreed to pay for the cost of his legal defense in the criminal trial, only to renege on that promise in January.

That previous agreement led to one of the zingers filed by prosecutors in early December, when they noted that Blankenship “has been able to hire the crème de la crème of criminal defense counsel.”

We’ll see whether that crème de la crème of criminal defense teams can keep Blankenship from seeing the inside of a prison cell once his trial begins next month — if it’s not delayed further.