The seven sailors consisted of two from Egypt and five from India, chief of the immigration division of the East Java office of the Law and Human Rights Ministry, Zakaria said on Friday.
Zakaria said the seven sailors are crew members of Egyptian flagged MV Zack Bachacha 1 owned by PT Java Ocean Shipping.
"The ship has trouble engine and is being repaired at Tanjung Perak port in Surabaya," he said.
The seven sailors came to Indonesia using visa on arrival, he said.
"Their permits of stay have expired since nearly five months ago," he said.
He said the sailors should have reported to immigration authorities to extend their permits of stay while the vessel was being repaired.
"In addition, they can ask their agent to repatriate them to their respective country. We have called their agent who stays in Jakarta," he said.
The seven foreign sailors are being accommodated at the immigration house in Bangil, Pasuruhan district, East Java.
"The seven sailors must be deported in accordance with the law," he said.
Reporting by Slamet Agus Sudarmojo/Hanif Nashrullah
Editing by Suharto, Bustanuddin