The Super Tucano turboprop came down shortly after taking off from Abdul Rachman Saleh air force base at Malang in East Java, said base commander Djoko Senoputro.
The pilot as well as two civilians, a woman and a man, were killed in the accident, he said. The plane's engineer has still not been located.
"After doing a test flight for about 45 minutes, we lost contact with the plane soon after they were requesting descent," Senoputro told AFP.
An eyewitness said the light attack and trainer aircraft was climbing before it plunged into the residential area. It crashed very hard, emitting thick smoke and a strong gasoline smell, he said.
Also Read
The air force said it would conduct an investigation into the crash, the latest of several military aviation accidents.
In December last year two pilots were killed when a military plane crashed in central Java while performing manoeuvres.