Two waterfront Vineyard Haven companies owned by Ralph M. Packer have been ordered by a federal judge to pay $1.3 million in fines for years of violating federal and state environmental laws designed to protect clean air and water from pollution.

The U.S. District Court of Massachusetts ordered R.M. Packer Company Inc. and Tisbury Towing and Transportation Co. to pay the fines over the next four years and take immediate steps to comply with environmental laws as spelled out in the federal Clean Air Act and Clean Water Act.

“Compliance with environmental regulations is, and should be, the cost of doing business even for smaller companies,” U.S. District Court Judge Denise Casper wrote in the Sept. 30 ruling.

Mr. Packer said this week that he will appeal. He did not dispute the violations, but said the fines are excessive and could possibly bankrupt his companies. Similar statements were made in court pleadings.

“We are under great strain of meeting the demands of the EPA [Environmental Protection Agency],” Mr. Packer said. “We are trying to fulfill the customers’ needs and fulfill the requirements of the EPA, Coast Guard and Homeland Security.”

The case was brought by the environmental enforcement section of the Justice Department in 2016. Voluminous court records document three years of proceedings that concluded with a four-day bench trial in Boston in September.

Violations at issue in the case date to 2013, and include a failure by Packer Co. to maintain emissions control equipment at its bulk fuel terminal on Beach Road in Vineyard Haven. Proper equipment was installed after the company was cited for noncompliance in 2002. But later there was a failure to repair vapor leaks and to inspect, document and report on the equipment, federal regulators said.

The bulk fuel terminal also failed to comply with industrial stormwater requirements and properly maintain boat cleaning operations, waste stockpiles, and oil and waste storage containers, regulators found. As a result, harmful pollutants were discharged directly into the Lagoon Pond and Vineyard Haven Harbor over a period of years, regulators for the Environmental Protection Agency said. The harbor leads into Vineyard Sound, a federally regulated waterway.

Tisbury Towing, a Packer company that transports gasoline and other petroleum products between New Bedford and Vineyard Haven, was also found in violation of Massachusetts Air Pollution Control regulations. While R.M. Packer Co. has been cited and fined in the past, including in 2002 and again in 2008, this is the first time Tisbury Towing has been cited and fined. The towing company also contracts with the Coast Guard to respond to oil spills in waters around Martha’s Vineyard.

As spelled out in court documents, Mr. Packer and his wife Dorothy are the sole owners and chief executives of the marine transport and fuel storage operations that have had a presence on the Vineyard Haven waterfront dating to the 1950s and 1960s.

Among other things, Packer supplies home heating oil and gasoline, both retail and wholesale, on the Island, and operates the only deepwater dock in Vineyard Haven capable of offloading large items from barges. The company also has a terminal in New Bedford and barges petroleum and other products between ports in the Whaling City and Vineyard Haven.

Bulk fuel terminal failed to comply with industrial stormwater requirements. — Jeanna Shepard

In their brief, attorneys for the government framed their request for court intervention in strong terms.

“Albeit defendants are small companies, their prolonged and ongoing disregard of environmental requirements has increased public health risks, threatened the natural environment and drained government resources,” they wrote. “Violations from small facilities can collectively cause substantial pollution, and thus must be met with meaningful consequences.”

In a memorandum accompanying her decision, Judge Casper noted the voluminous record of violations, most of which were ignored over the years by the Packer company. “The court cannot conclude that there have been any sustained, good faith efforts by the defendants to comply with the Clean Air Act and Clean Water Act,” the judge wrote. “Even when the EPA gave defendants notice of the specific violations, defendants often took years to comply . . . Even after the complaint in this case was filed in April 2016, there have been continuing violations.”

The court found based on expert testimony at trial that there was an undisputed economic benefit to Packer for not complying with the regulations.

“Although defendants dispute their ability to pay the civil penalty that the government seeks . . . they presented no evidence disputing that R.M. Packer reaped an economic benefit from failing to comply with the law and this court finds that it did so . . .” the judge said in part.

The judge also wrote:

“The only factor that defendants more vigorously contest is that they will not be able to bear the burden of the penalty in excess of one million dollars . . . defendants evidence, however, is not compelling on this point.”

Mr. Packer will be required to pay the fines in installments over the next four years, with an initial payment due on Nov. 30.

Speaking to the Gazette by phone Thursday, he said he plans to appeal the ruling, and described an increasingly complicated technical and regulatory environment that he said his company is taking steps to keep pace with.

He noted that Packer Co. plays a key role in controlling truck traffic to the Island.

“The Vineyard is growing,” Mr. Packer said. “It needs bulk materials. And if you take what we bring over on barges, the bulk material, petroleum — we are bringing over a generator next week for the town of Edgartown — take what we bring over and count the trailers and trucks that don’t have to go on the Steamship. We take 34,000 cars a year off the Bourne Bridge.”

Among other things, he said he has hired a full-time compliance officer who has been on the job for about three months.

“We realized we are becoming more sophisticated and it is becoming more technical. All reporting is done electronically now,” Mr. Packer said. “We’ve spent in excess of $2 million — no grants — just two million from our company to meet new rules and regulations. Maybe we haven’t moved fast enough, but we have spent the dollars to try and keep the environment stable.”