U.S. authorities have seized a large container ship operated by Switzerland-based Mediterranean Shipping Co., three weeks after customs authorities found 20 tons of cocaine on the vessel.

The MSC Gayane, which is owned by J.P. Morgan Asset Management and chartered to MSC, the world’s second-biggest container ship operator by capacity, is “subject to possible forfeiture,” U.S. Attorney William McSwain said in a statement.

Built in 2018, the ship has capacity for around 10,000 containers and is worth about $90 million. It is anchored at the Delaware River near the Philadelphia port and is expected to stay there for an extended period, according to people involved in the matter.

”A seizure of a vessel this massive is complicated and unprecedented—but it is appropriate because the circumstances here are also unprecedented,” Mr. McSwain said. “When a vessel brings such an outrageous amount of deadly drugs into Philadelphia waters, my office will pursue the most severe consequences possible against all involved parties in order to protect our district—and our country.”

Newsletter Sign-up The Logistics Report Top news and in-depth analysis on the world of logistics, from supply chain to transport and technology. PREVIEW

The Gayane was raided on June 17 by U.S. Customs and Border Protection agents who found about 20 tons of cocaine with a street value of $1.3 billion stashed in several containers. The ship had sailed from Freeport in the Bahamas and before that it called in Panama and Peru after starting its voyage in Chile. It was due to sail on to Europe after the U.S. stop.

“MSC remains grateful to the government officials in the U.S. for their proactive work and has offered its continued support, building on a longstanding track record of good cooperation with the authorities,” an MSC spokesman said in a statement. “MSC is assisting and cooperating with the authorities as required and the company is not the target of any investigation.”

Eight crew members from Serbia and Samoa were arrested and several have been charged in the case, the people involved said. They said the ship’s second officer and another crew member were charged with helping bring the cocaine aboard the vessel.

The Gayane was the second MSC ship raided in Philadelphia this year for drug movement. In March, federal agents discovered nearly 1,200 pounds of cocaine onboard the MSC Desiree, a similar size vessel to the Gayane.

Customs agents also seized 1.6 tons of cocaine on another MSC vessel, the MSC Carlotta, as it entered the Port of Newark, N.J., in February, authorities said.

After the two incidents, the customs agency has temporarily suspended MSC’s Customs-Trade Partnership certification, which means the liner is no longer regarded “low risk” and its cargo is subject to more scrutiny..

MSC said its shipping customers can expect minimal disruption from the suspension and cargo from the Gayane has been transferred to other vessels and moved to end users.

Ship executives, maritime lawyers and brokers said the case is unprecedented for the scale and age of the vessel.

“Historically, ships involved in criminal activity are older and beaten up,” said Basil Karatzas, chief executive of New-York-based Karatzas Marine Advisors & Co. “It is strange that such a modern and expensive vessel is involved in such a blatantly criminal case, like moving 20 tons of cocaine.”

Global maritime regulation doesn’t require ocean carriers to check the contents of all containers they move as this would lead to long delays across supply chains.

Write to Costas Paris at costas.paris@wsj.com