The shootings occurred in Cililitan and Cikampek, Indonesian news agency ANTARA reported.
Inspector General Edward Aritonang of the national police identified one of the slain gunmen in Cililitan by the single name Maulana, who had been at large since his alleged involvement in terrorist activity in Jantho last February, ANTARA said.
In Cikampek, one of those killed was identified as Saptono, who also had been on the terrorist list.
Police told the news agency those slain and the suspect in custody had intended to commit terror acts in the coming weeks.
Britney Spears on kissing Ryan Gosling, Justin Timberlake in the Mickey Mouse Club
Texas principal bans speaking Spanish, stirs controversy