A Pennsylvania official said Friday that environmental regulators were fed up with Sunoco Pipeline LP’s “history of poor compliance” in the construction of its Mariner East project, which led to its dramatic decision last month to halt construction in Chester County where Sunoco’s work polluted a popular state park lake.

“It’s at a point where we have taken the company’s word countless times over and over and over again, and it has come back to bite us on numerous occasions,” Domenic Rocco, director of regional permit coordination for the Pennsylvania Department of Environmental Protection, testified Friday.

Rocco’s testimony came on the fourth day of hearings before Environmental Hearing Board Judge Bernard A. Labuskes Jr., who is considering Sunoco’s emergency request to override DEP’s order last month to abandon a half-mile route along its Mariner East 2 pipeline, which would transport natural gas liquids like propane, and to take a costly detour.

DEP ordered Sunoco to abandon its ongoing operation to horizontally drill the Mariner East 2 pipeline along Little Conestoga Road in Upper Uwchlan Township after about 8,000 gallons of drilling fluid leaked to the surface on Aug. 10 and polluted the lake at Marsh Creek State Park.

Sunoco Pipeline, a unit of Energy Transfer LP of Texas, called the state’s order “arbitrary, capricious, and an abuse of its discretion” and asked the hearing board to overturn the decision. Sunoco said the new route would cause more environmental harm, make it abandon $17 million of work, and add up to $19 million in costs. It would also delay completion by two years.

The hearing, conducted online, included a parade of expert witnesses who testified about the technical details of what went wrong with Sunoco’s project and what can be done going forward to reduce risks.

DEP portrayed the continued use of the planned underground drill route near Marsh Creek as risky because of the unstable bedrock. And it said that although Sunoco knew of the risks, it did not take sufficient precautions to reduce chances that drilling fluids would leak through fractures to the surface and pollute Marsh Creek.

The DEP’s Rocco also made clear that DEP had run out of patience with Sunoco and produced an elaborate spreadsheet documenting its violations — $15.9 million in fines over four years and numerous mishaps. These included 159 leaks of drilling mud during horizontal directional drilling (HDD), a process by which the company drills a cavity underground into which the pipeline is pulled, rather than burying the pipe in a trench near the surface.

“It got to the point where we had to take an action,” Rocco said. “We basically said, `Enough is enough.' "

In his closing arguments, Robert D. Fox, a Sunoco lawyer, suggested that Rocco’s testimony showed that DEP’s action against the company was intended as punishment. “A compliance order is supposed to be for compliance, not punitive,” he said.

The $5.1 billion Mariner East project is a key link in the state’s effort to promote Pennsylvania shale-gas development and has been supported by organized labor and the energy industry. But its construction has provoked sharp opposition from residents and aroused fears about pipelines transporting highly volatile liquid fuel near populated areas.

The spills — or “inadvertent returns” — of drilling fluid typically contain a mixture of bentonite clay and water, which is classified as an industrial waste. The Marsh Creek incident left a 15-foot wide sinkhole near the lake, and 33 acres of the lake remain closed to boating and other uses.

Sunoco said it had cleaned up most of the spill, committed to remediating the lake, and likened the spill’s impact to inflows of sediment that occur during heavy rainstorms.

But state officials disputed those arguments. “It was in no way a small issue,” said James Wassell, the Marsh Creek State Park manager. This spill “shouldn’t have happened in our lake.”

Judge Labuskes, who has ruled on numerous disputes among Sunoco, state regulators, and activists during the Mariner East project, asked the parties to submit briefs by Nov. 23, after which he would make a decision.