If I knew the layout of the ship, it would be clearer, but would there be a way to sneak something out of the hold through a porthole, or in some other manner, onto a waiting small boat (or hands of a scuba diver) to avoid seizure? Maybe I have too vivid an imagination.
You've been watching too many James Bond flicks...
Under water hatches on cargo ships were used by the Soviets decades ago to launch frogmen. One US destroyer in Hong Kong put to sea, and discovered a big chunk of its sonar dome had been "surgically" sliced out and removed. This is also an easy way to bring agents in and out of "denied areas" where ships and airports are closely watched.
One method would be to drop a nuke in a welded watertight capsule from the bottom of a ship when it was in a US port with a timer or other detonation device. Such a nuke could already have been dropped while the ship was in harbor.