For Energy Transfer Partners, the Texas-based company behind the Dakota Access Pipeline, Feb. 23 was a good day.

After months of waging a public and at times bloody battle with protesters bivouacked outside its construction site in North Dakota, law enforcement officers razed the encampment and arrested the holdouts. Meanwhile, roughly 1,700 miles east, the company completed the final edits requested by regulators to its application to start building the Rover natural gas pipeline, a $4.2 billion project through Ohio.

That project had sailed through the permitting process, and these markups would be its last. Project manager Buffy Thomason wanted to extend thanks to the Ohio Environmental Protection Agency, so she emailed the firm’s lobbyist in the state, Art Arnold, that evening.

“It’s awesome,” she wrote in an email, which was obtained by HuffPost. “It’s such a beautiful thing. Please tell your contact how much we appreciate their help.”

Arnold forwarded the message to Laura Factor, the agency’s assistant director, less than an hour later. In the same email, Arnold called the OEPA staff “among if not the most honest and helpful people I’ve encountered.” (OEPA Director Craig Butler described Arnold and Factor as “good friends” in a separate exchange with an agency colleague.)

“They’ve done their jobs without beating us up in the process,” Arnold added. “They’ve offered options when we were stuck. They’ve pointed us in the right direction so we could build the pipeline and stay within their good graces.”

Greenpeace A screenshot of an email between Art Arnold, Energy Transfer Partners' lobbyist in Ohio, and Laura Factor, the assistant director at the Ohio EPA.

The emails, released this week to Greenpeace through a Freedom of Information Act request, depict a $22 billion firm ― which until recently boasted President Donald Trump as a shareholder and Energy Secretary Rick Perry as a board member ― comfortably exerting influence over a state agency charged with policing its activities.

But just a few months after those emails were sent, Energy Transfer Partners and the state officials became embroiled in a vicious public fight over a massive drilling fluid spill and construction pollution. The company has flagrantly challenged the OEPA’s authority, infuriating the agency and eliciting a rare public investigation by the Federal Energy Regulatory Commission, or FERC, the federal agency that regulates interstate electricity and natural gas operations.

The dispute offers a cautionary tale in what one critic described as “regulatory capture” of a state agency by a company with deep ties to the Trump administration and a reputation as an environmental pariah unafraid to deploy scorched-earth tactics against its opponents. The moves by Energy Transfer Partners further fuel fears of what’s to come amid proposed steep cuts to the EPA’s budget and a brazen campaign by U.S. Administrator Scott Pruitt to cozy up to fossil fuel interests.

Energy Transfer Partners’ problems in Ohio began shortly after construction began on Rover in March. Heavy rains poured as workers built a stretch of the pipeline over flat farmlands, and workers began dumping excess, sediment-laden water onto fields and into streams, according to citations from the OEPA. Then, in April, the company accidentally leaked onto Ohio wetlands more than 2 million gallons of fluid used to lubricate the machines that bore pathways for underground pipes through a process known as horizontal directional drilling. The spill suffocated anything that lived in an area the size of nearly nine football fields under a foot or more of a slurry of nontoxic bentonite clay and water, the agency said.

On May 5, the OEPA ordered the company to submit a plan to address future spills, restore the wetlands and apply for stormwater permitting. It also fined the firm $431,000. In a sharp break from the charm it applied during the application process, Energy Transfer Partners rejected the agency’s demands, insisting that because the pipeline crossed state boundaries, the OEPA lacked the authority to make those orders.

Ohio EPA Workers vacuum, hose down and brush more than a foot of slurry spilled from a construction site along the Rover pipeline in Ohio.

Butler, director of OEPA, told HuffPost that this sort of defiant response from a company was unusual.

“This kind of pushback we’re getting from Rover that says, ‘You have absolutely no state authority, this is all a FERC issue,’ and the tenor and tone they’ve taken to interact with us doesn’t happen often,” Butler said. “This very negative response that we’ve gotten from Rover up until now and very recently is pretty uncharacteristic.”

On May 10, FERC stepped in to back up the state EPA, halting construction at eight sites where Energy Transfer Partners had yet to begin boring the pipe. FERC’s order has given environmental groups like the Sierra Club temporary reprieve from their own legal effort to block a pipeline they see as fueling climate change and endangering the environment in the state; one of the proposed construction sites includes the Captina Creek, the only cold-water stream in Ohio with the right conditions for the endangered hellbender salamander to breed.

But FERC allowed Energy Transfer Partners to continue work at the 22 other locations, including the site of the largest spill. The company sent teams to vacuum up the drilling sludge from the wetlands and deposit it in two nearby quarries.

Things took another turn on May 26, when the OEPA discovered traces of diesel in the samples collected from the spill site. Using diesel in the drilling fluids violated the permit FERC had granted, forcing regulators to reclassify the site as an industrial accident. On June 1, FERC opened an investigation into the incident.

On July 7, the OEPA once again sent a letter listing demands to Energy Transfer Partners. The letter reiterated orders made about two months earlier to apply for stormwater permits, pay mounting fines nearing $1 million and submit a plan to restore the wetlands. The agency also directed the company to excavate the diesel-contaminated slurry from the quarries, dispose of it at solid-waste landfills and install groundwater monitoring around the area to ensure that private wells weren’t affected. The company agreed only after FERC backed up the OEPA on the demands five days later. The OEPA said it will review Energy Transfer Partners’ submissions by next week to determine if its plans are in compliance.

In a brief phone interview, Energy Transfer Partners spokeswoman Alexis Daniel told HuffPost the company plans to meet regulators’ demands, but declined to comment further.

“We do continue to work with the Ohio EPA to comply with their directives,” Daniel said. “We’re working through that process with them and FERC on a daily, hourly basis.”

The OEPA said it remains committed to supporting oil and gas development in the state. Still, Butler, the agency’s director, said Energy Transfer Partners “received no preferential treatment” during the application process, despite what seemed like an amicable relationship at the start of the construction process.

“At the highest level, this does not diminish our overall posture in terms of trying to support oil and gas development in the state, including the development of pipeline networks,” he said. “We’ve got several of these large pipelines. Our only concern is, while we’re supporting they at least have to follow the rules.”

He added pointedly: “Rover clearly isn’t.”