Indonesia detained a ship from Malaysia carrying around 30 tonnes of fertiliser on Thursday in Bali, suspecting that those might be used for making bombs.
The police and customs authorities questioned the crew and investigated the material for potential links to radical networks as Indonesia, the world's largest Muslim-majority nation, is on high alert for militant attacks.
Hendra Suhartiyono, a Bali police official, said the authorities were investigating the matter. They were trying to find out whether the ship was on its way to the eastern island of Sulawesi which is known for militant violence.
"We are not closed to the possibility that this chemical material ... could also be for the benefit of terrorist groups in Sulawesi to make low-impact and high-impact bombs," Suhartiyono told Reuters.
Another Bali customs official, Thomas Aquino, said: "At the moment the crew are being intensively examined on explosive material ammonium nitrate that was carried, shipped from Malaysia."
"They confessed that the boat was rented to be shipped to Sulawesi. They thought the material in the sacks was fertiliser. We will detain the ship crew to be processed legally," he added.
Earlier this year, the security forces killed a militant called Santoso in Sulawesi. Santoso was one of the first Indonesians to be have declared loyalty to Islamic State and he cultivated a small radical network in the Poso area.
Last year, President Joko Widodo ordered the military to support the police force along with fighter jets and warships to capture US-designated "terrorist" Santoso, who was hiding in the jungles of Sulawesi.
In January, Indonesia experienced its first militant attack in several years that killed four people. The Islamic State claimed responsibility for the attack.
Last month, the authorities tightened security in Bali after reports of a suspected militant plot on the island.
Earlier this month, Indonesian security forces arrested prominent extremist Basri alias Bagong, one of the top leaders of the East Indonesia Mujahideen (MIT) militant group in Poso, Central Sulawesi.