President Donald Trump’s choice to head a federal coal mine regulator, like more than one of his nominees, is a vocal critic of the very agency he’s being asked to lead. Steven Gardner is a longtime coal industry consultant, and he has called the agency’s marquee Obama-era regulation the product of “one of the most disingenuous and dishonest efforts put forward by a government agency.”

But in Gardner’s case, there is an unusual — and contentious — twist: He runs an engineering firm that produced a report as part of the process of preparing that regulation, and the agency deemed it so shoddy that it cut ties with Gardner’s company. Now he’s the nominee to head that agency, the Office of Surface Mining Reclamation and Enforcement. (In broad terms, OSMRE — pronounced “oz-muhr” — focuses on mining’s effect on the environment, while the other key regulator, the Mine Safety and Health Administration, focuses on the welfare of miners.)

State and federal officials at the time harshly criticized a draft report produced jointly by Gardner’s firm, ESCI, and other contractors. They blasted it as “nonsensical,” “junk,” “inaccurate and incomplete,” and “a piece of crap.” Some OSMRE staff members went so far as to accuse Gardner of trying to sabotage the regulation his firm was hired to help develop.

Acrimony and accusations flowed in both directions. Gardner charged that agency officials had pressured contractors to soften the projected economic impact of the regulation, the Stream Protection Rule. The stated purpose of the rule was to limit damage done by coal mining to waterways, but Gardner and other critics saw it as a strike at the heart of the coal industry.

Read More Lifting the Veil on Another Batch of Shadowy Trump Appointees The administration continues to quietly hire political staffers — more than 1,000 so far, many of them regulating industries they previously worked for — but we’ve uncovered more identities. “The swamp continues,” says a Trump campaign official who is now a lobbyist.

Gardner is expected to testify in the coming weeks at a confirmation hearing before the Senate Committee on Energy and Natural Resources. Former Obama administration officials and a contractor who worked with Gardner have questioned how he will lead an agency that he has held — and that has held him — in something less than high regard.

“It has been said that one of my biggest challenges will be winning the support of OSM staff I will oversee due to the past controversies,” Gardner said in an emailed statement. “While there may be some in OSM that differed with my opinions, many others sent me messages of support noting they did not agree with OSM management during that controversial period.” (The White House referred a request for comment to the Department of the Interior, OSMRE’s parent agency, which did not respond to a request for comment.)

This was no backroom tiff. The conflict between Gardner and OSMRE played out in unusually public forums, including congressional hearings. On Capitol Hill, Republican opponents of the Obama administration’s ambitious environmental and energy agendas had branded its coal policy a “war on coal.” They seized on Gardner’s claims as evidence that the administration was fighting dirty.

Gardner’s strained relationship with the agency can be traced to 2010. ECSI was among a group of contractors hired to analyze the environmental and economic impact of various proposals for the Stream Protection Rule. OSMRE officials hoped ECSI and another subcontractor, Morgan Worldwide, would serve as counterweights to each other. ECSI worked principally with the coal industry, while Morgan Worldwide tended to represent environmental interests.

By the fall of that year, state and federal officials had begun to express doubts about whether the contractors were up to the task. “If this had come from one of my entry-level students (when I taught college hydro), I would have failed them,” OSMRE scientist Debbie Dale wrote in an email that November, describing a section of the draft report assigned to ECSI. She called it the “most poorly written ‘professional’ document” she had ever seen, according to the 2013 inspector general report. Eight state regulators wrote a letter to OSMRE Director Joseph Pizarchik, calling it “often nonsensical and difficult to follow.”

At one 2011 meeting, Dianne Shawley, a senior agency attorney, laid the bulk of the blame at the feet of ECSI and the other subcontractors. “They’ve given you a piece of crap, really. To be blunt,” she told executives from the general contractor, Polu Kai Services.

Former Office of Surface Mining Reclamation and Enforcement director Joe Pizarchik speaks during a Natural Resources Committee hearing titled “Jobs at Risk: Waste and Mismanagement by the Obama Administration in Rewriting the Stream Buffer Zone Rule,” in Washington, D.C., on Friday, Nov. 4, 2011. (Andrew Harrer/Bloomberg via Getty Images)

Agency officials were dismayed. “In my experience, it was very unusual to receive so much negative feedback about a contractor’s work,” said Pizarchik, who stepped down at the end of the Obama administration, in an interview with ProPublica. “I’m not aware of other instances where this has occurred.”

Sean Jensen, the president of Polu Kai Services, defended the draft report, noting the contractors never had a chance to finish it. “We did our job,” he said. “I’m happy with the team’s work.”

In the meantime, another concern had surfaced, this one limited to Gardner. Staff members, who have since left OSMRE, told Pizarchik they believed Gardner was trying to undermine the Stream Protection Rule. They accused him of being uncooperative, asserting that he was deliberately misreading parts of the draft rule so he could condemn it as an overly broad ban on underground mining. (In an email, Gardner described himself as cooperative and his reading of the rule as correct.)

Gardner had spent decades consulting for coal companies and would later be elected president of a major professional association for the mining industry. A Kentucky native, he is fond of observing that, because he grew up on a tobacco farm, he has “the honor of being involved in the two most politically incorrect industries in the country.”

The dispute between the contractors and the agency came to a head in January 2011. The Associated Press had published a leaked draft of the contractors’ initial analysis. It suggested that the Stream Protection Rule would have a devastating impact, wiping out 7,000 mining jobs nationwide.

OSMRE officials disputed the accuracy of the projection, but by then it was too late. The job-loss figure had become a part of the public discourse around the agency’s incipient rule.

The fallout from the leak prompted a series of at times heated meetings at which OSMRE officials and the contractors tried to resolve their differences. The endeavor proved unsuccessful, and in March 2011, agency officials declined to renew the contract. They hired a new set of contractors to complete the project, though they retained Morgan Worldwide. (John Morgan, president of Morgan Worldwide, said agency officials never complained about his company’s work.)

Congress, however, wouldn’t let the issue rest. Republicans had found in the dramatic job-loss figure powerful ammunition for their fight against the Obama administration’s coal policy. “It was all about blocking everything the Obama administration wanted to do,” Pizarchik said. “Everything was a war on coal.”

At congressional hearings in November 2011, the tensions between OSMRE and the contractors spilled into the open. When one congressman declared that the Stream Protection Rule “will kill jobs and stop coal mining,” Pizarchik accused the contractors of producing job-loss projections with “no basis in fact.” Incensed, Gardner testified two weeks later that OSMRE officials had put pressure on the contractors to manipulate their analysis to obscure the reality that the rule would decimate the American coal industry.

Read More Trump’s Mine-Safety Nominee Ran Coal Firm Cited for Illegal Employment Practices Records show the coal mining company formerly run by David Zatezalo retaliated against a foreman who complained of harassment and unsafe conditions.

The dispute attracted the attention of the inspector general for the Department of the Interior, which ultimately produced a report that criticized both sides. The IG concluded that OSMRE officials had managed the contracting process poorly, but found no evidence to support Gardner’s claim that administration officials had tried to improperly influence the contractors’ work. The contractors’ job-loss figures, investigators concluded in their 2013 report, weren’t fabricated, but they relied on little more than claims of expertise.

“The contractor and subcontractor could not identify any of the assumptions they made,” Pizarchik said. “Staff reported to me they said, ‘We’re the experts. That’s our opinion. Rely on that.’ ... It was purely their opinion derived through the ‘expert elicitation process.’” (Gardner disputed this, saying the assumptions “were clearly identified.”)

All these years later, Gardner has come out on top in one respect. In February, less than a month after the Stream Protection Rule went into effect, Congress nullified it. In the intervening years, Gardner had continued to denounce OSMRE and the Stream Protection Rule in lectures, on his Facebook page and in newspaper op-eds.

It remains to be seen whether the victory proves Pyrrhic. “I think it’s a fatal flaw,” John Morgan, Gardner’s fellow subcontractor, said. “If you abused civil servants and accused them of the types of actions he did, it would be very difficult to be a leader.”