[What you need to know to start the day: Get New York Today in your inbox.]

The authorities were conducting a routine inspection aboard the M.S.C. Carlotta last month when a worn, teal shipping container caught their eye: The pins that held the containers’ doors in place appeared to have been doctored.

The Carlotta, a container ship, had just arrived in Newark from Buenaventura, Colombia, and the teal container was supposed to contain dried fruit. Instead, officers opened the doors to find something that stunned even the most experienced customs agents: 60 tightly wrapped bundles of white powder, each the size of a small trunk.

The bundles turned out to be 3,200 pounds of cocaine, the largest drug shipment to be intercepted at Port Newark in a quarter-century, a bounty worth $77 million on the street, the authorities said on Monday.

The discovery of the shipment underscored the reality that legal ports of entry remain the main channel through which illicit drugs flow, even though President Trump has contended that drugs are pouring over the unsecured sections of the southern border to justify building a barrier there.