The protest effectively closed the doors of the Port Newark-Elizabeth Marine Terminal in Elizabeth. Workers also blocked the entrances at cargo ports in Staten Island, Brooklyn and Bayonne.
"We all have to stick together or the union will fall apart," longshore worker Maryellen Reilly said.
Thousands of dockworkers, members of the International Longshoremen's Association, walked off their jobs in solidarity with union members from Camden, New Jersey.
People like Kevin O'Hara, one of two hundred dockworkers who stand to lose their jobs over a dispute with the Del Monte fruit company.
Workers say Del Monte plans to unload its ships at a cheaper port despite millions of dollars in union concessions.
The shutdown left truckers with nowhere to drop their cargo. They drove circles around the ports, furious because time is money.
"We feel strongly that these actions by the ILA, in refusing to cross a non-bona-fide line, are a violation of the no-strike clause of our current collective bargaining agreement," said the head of the shipping association.
Late in the day, a district court judge agreed and ordered the workers to return to their jobs.
A shipping association spokeswoman says the stoppage was affecting 12 ships waiting to be unloaded in the ports of New York and New Jersey. She says passenger terminals on New York's west side were not affected.