"They were diving without permission," The head of the Indonesian navy base in Tanjung Pinang in the Riau islands, First Admiral Malik Yusuf, told AFP.
He said the group, including 21 Singaporeans, two Americans, two New Zealanders, a German, two French nationals and two Malaysians were detained Saturday in the Anambas island group east of Malaysia.
"They were arrested by a warship," Yusuf said. Asked if the arresting sailors were armed he said, "That is definite."
The foreigners were being detained on their tourist boat at a naval base in Tanjung Pinang on Bintan, an Indonesian island off Singapore, he said. The vessel flew a Thai flag but was operating out of Singapore, he said.
"The plan is maybe tonight (Wednesday night) they can be deported, maybe through Singapore," he said.
Yusuf said the incident did not happen along Indonesia's maritime border but well within the country's territorial waters.
In September, officials in East Timor said an Indonesian warship attempted to chase away foreign divers it apparently believed had strayed into Indonesian waters near the East Timor island of Atauro.
Indonesia is the world's largest archipelago with more than 17,000 islands.
It has started paying attention along its borders after losing two islands to Malaysia in a December, 2002 decision by the International Court of Justice.
Indonesia's navy chief, Admiral Bernard Kent Sondakh, has warned conflict could erupt with neighboring countries if Indonesia did not assert its sovereignty around 12 border islands.