Federal authorities have released the cargo ship involved in last month’s 20-ton cocaine seizure at the Port of Philadelphia, but said they are still considering pursuing civil or criminal forfeiture of the ship now cruising toward the Netherlands.

U.S. Attorney William M. McSwain said in a tweet Monday that his office had reached a deal with two international shipping firms with financial interests in the MSC Gayane to return the ship to commercial service.

Under the terms of the deal, the boat’s operator, Switzerland-based Mediterranean Shipping Co. (MSC), posted a $10 million security deposit and $40 million surety bond. The firm — along with the ship’s registered owner, Bermuda-based Meridian 7 Ltd. — also agreed to submit to the jurisdiction of U.S. courts while the Justice Department’s investigation continues.

The companies had argued that leaving the Gayane anchored in the Delaware River posed an “extreme commercial prejudice and … hardship” to their operations.

It had remained there under court order since last month, when U.S. customs authorities discovered its illicit cargo, worth an estimated $1.1 billion, as the ship pulled into port at the Packer Avenue Marine Terminal in South Philadelphia. The massive cocaine haul was hidden in shipping containers carrying legitimate goods, such as wine, Chilean dried nuts, and scrap metal from the United Arab Emirates.

As of Monday afternoon, the ship-tracking website MarineTracker.com showed the Gayane plying the Atlantic Ocean en route to Rotterdam, its initial destination before discovery of the contraband.

Aside from securing the ship’s temporary release, the agreement approved Friday by U.S. District Judge Harvey Bartle III highlighted obstacles U.S. investigators could face — including securing witness testimony, accessing documents, and enforcing subpoenas abroad — as they pursue an investigation already stretching into more than a half dozen countries and foreign jurisdictions.

Chief among the potential pitfalls is sorting out the complex, globe-spanning web of businesses and entities that hold a financial stake in the 1,000-foot cargo vessel or its operations.

Aside from the two companies that are parties to the agreement, the filings list a firm based in Guernsey and various subsidiary firms of MSC — one based in Sorrento, Italy, and another in Limassol, Cyprus — as playing a role in staffing and technical operation of the ship.

The Wall Street Journal has reported that J.P. Morgan Global Maritime Investment, an offshoot of the U.S. bank, also holds a stake in the Gayane, although the asset management subsidiary is not mentioned in last week’s court filings.

Shipping expert Basil Karatzas of Karatzas Marine Advisors, in New York, said such complex, transglobal financial arrangements are common because building, maintaining, and insuring a vessel, its staff, and operations can cost hundreds of millions of dollars.

“It’s quite typical of the industry,” he said in an interview Monday. “Quite often, the company that is the legal owner of the asset, their name is not on the vessel. You have a lot of private equity funds that own vessels for financial reasons.”

In order to permanently seize the Gayane, prosecutors must prove that the owner, operator, or members of its staff knew of the existence of contraband aboard the vessel.

The agreement between the Justice Department and the ship’s owner and operator extracts several concessions that could make that job easier.

Both MSC and Meridian 7 agreed to facilitate any requested testimony from crew members or officers who might be stationed overseas and, in some cases, to pay for their travel to testify in front of a grand jury weighing indictments against six crew members arrested in Philadelphia.

The deal also prohibits either company from retaliating against staff members for testimony that might damage the interests of their firms.

The six crew members charged were recruited from the Balkans or Samoa by a ship-staffing agency. According to court filings, at least two have confessed to helping smuggle the cocaine aboard the ship on journeys between Panama and Peru earlier this year.

The agreement also requires the firms to cover all maintenance and insurance payments for the ship and return it to a U.S. port within 90 days should a judge enter a final forfeiture against the Gayane.

In a statement last week, a spokesperson for MSC insisted that the firm was not the target of an investigation and that it was “assisting and cooperating with the authorities as required.”