President Ricardo Martinelli told local media that the ship, which was sailing from Cuba, contained suspected "sophisticated missile equipment".
He posted a photo of what looked like a large green object inside a cargo container on his Twitter account.
He said the ship, which was searched on its way into the Panama Canal, was being held for further investigation.
The ship was stopped near Manzanillo on the Atlantic side of the canal.
Mr Martinelli said the authorities were checking the ship for drugs when they found the suspected weapons in containers of brown sugar.