Updated

A judge Monday dropped all charges against three Middle Eastern men whose miscommunication with guards at the Port of Miami had sparked a terrorism scare.

Officials initially said that the three men were caught trying to slip past a security checkpoint in a cargo truck on Sunday and that the driver had said he was alone. Federal investigators and a bomb squad were called in, and authorities eventually determined the freight was harmless.

Even though Miami-Dade Police said the problem was a miscommunication, driver Amar Al Hadad, 28, was still charged with resisting an officer without violence, and his passengers, Hussain Al Hadad, 24, and Hassan El Sayed, 20, were charged with trespassing.

Court records show a judge dismissed all the charges on Monday and the men were released.

The three are permanent U.S. residents from Iraq and Lebanon who live in Dearborn, Mich.

Miami-Dade County police declined to comment on the judge's decision. Authorities said no federal charges were expected.

The scare started when a port security officer became suspicious because the truck's driver couldn't produce proper paperwork during a routine inspection to enter the port Sunday morning, said Miami-Dade police spokeswoman Nancy Goldberg.

"Due to a miscommunication between the gate security personnel and the truck driver, we believe there was a discrepancy in the number of people in the vehicle," Goldberg said. "This, and the fact that one of the individuals did not have any form of ID, raised our level of concern."

The FBI and the Department of Homeland Security were called to the scene, along with federal and local law enforcers, "in an abundance of caution," Goldberg said.

The truck's contents — electrical automotive parts in a 40-foot container — matched the driver's cargo manifest, she said.

The three men did not appear on any terrorist watch list, said Barbara Gonzalez, a U.S. Immigration and Customs Enforcement spokeswoman.

The Port of Miami is among the nation's busiest. More than 3.6 million cruise ship passengers traveled through in 2005, making it the world's top terminal for cruise vacationers. Its seaport services more than 30 ocean carriers, which delivered more than 1 million cargo containers there in 2005.