Twenty of the 12-inch long millipedes were discovered in a package in San Fransisco airport. Reuters

Customs officials in San Francisco have prevented a package filled with 20 foot-long giant millipedes from being smuggled into the United States.

The package came from Germany and was marked "toy model car" on the import form, but US Customs and Border Protection staff noticed something was awry when they put the parcel through an X-ray machine.

Officials found the package contained a large plastic foam box, which when opened revealed a large mesh bag containing 20 live foot-long millipedes, along with soil and paper.

Brian J. Humphrey, CBP Director of Field Operations in San Francisco, said: "Customs and Border Protection officers and agriculture specialists routinely X-ray and inspect packages arriving from foreign locations for contraband and other prohibited items before they are permitted to enter the US.

"The agriculture specialists on duty were quick to notice the deception and took the necessary action."

The package containing the insects has been turned over to investigators as it "was misrepresented in an attempt to bypass federal regulations".

Importing exotic animals into the US is not illegal, but federal agencies regulate those imports to ensure the proper documentation and permits have been obtained.