PORTLAND, Maine — Two German shipping companies are facing federal charges of falsifying environmental records in an effort to cover up a ship’s crew dumping waste water and oil overboard.

On Tuesday, a federal grand jury at the U.S. District Court in Portland indicted the owner and operator of cargo ship M/V Marguerita with failing to keep accurate pollution control records and falsifying records, according a statement from the Department of Justice.

The grand jury brought nine charges against the two companies related to at least eight instances in 2016 and 2017 when ship entered U.S. waters with records that did not properly document bilge water having been dumped off Liberian-flagged vessel, according to the statement.

It was unclear Wednesday whether the alleged discharges themselves were unlawful or where they took place. But court records indicate that the matter came to the attention of U.S. officials in June, soon before the Marguerita arrived in Portland.

On June 19, a crewmember informed the German companies that the Marguerita’s chief engineer had discharged bilge water from the ship but not recorded it, according to a motion from the two German companies’ lawyers seeking to quash a grand jury subpoena for records and testimony related to the incident.

The discharge was reported to U.S. officials, “remedial measures” were promptly taken and a third-party put the Marguerita through an environmental audit at its next port of call in Brazil, the lawyers wrote. But when the cargo ship arrived in Portland on July 7, at least 13 Coast Guard agents came aboard to inspect the vessel and detained its crew, according to lawyers George Chalos and Peter Rodway.

The indictment against the vessel’s operator, MST Mineralien Schiffarht Spedition Und Transport, and the financial firm that owns it, Reederei MS Marguerita, was not available in the court records Wednesday morning. A Department of Justice official said it had not yet been processed by the court and declined to comment further.

Lawyer George Chalos said he had not yet received the indictment Wednesday morning. The Coast Guard did not respond to a request for comment.

MST Mineralien Schiffarht has spent decades shipping clay slurry to Maine for use in the paper mill industry, the Portland Press Herald reported in 2016. The Marguerita was reportedly christened in Portland last July.