The men were cornered in a village in Tuban district on Saturday after attempting to shoot a traffic police officer who was approaching them when he saw their car stopped at the roadside, said national police spokesman Rikwanto.
The six refused appeals to surrender during a standoff that lasted several hours and were fatally shot by police, said Rikwanto, who goes by a single name.
On Friday, counterterrorism police arrested three suspected militants who were allegedly planning to attack a police station in East Java. Among those arrested was Zainal Anshori, a senior figure of Jemaah Anshorut Daulah, an umbrella group of Indonesian extremists that claims allegiance to the Islamic State group.
"They had acted on Anshori's order as a revenge of his arrest," said Rikwanto, citing police interrogation of other arrested militants.
Police said they seized dozens of rounds of ammunition, several firearms, knives, jihadi books and a car used by the men.
Muslim-majority Indonesia has carried out a sustained crackdown on militants since the 2002 Bali bombings by al-Qaida-affiliated radicals that killed 202 people, mostly foreigners. A new threat has emerged in the past several years from Islamic State group sympathizers.
Disclaimer: No Business Standard Journalist was involved in creation of this content