Video circulating on social media showed a fighter plane performing manoeuvres in the skies above Yogyakarta before spiralling toward the ground at speed and disappearing from view.
Indonesia calls off search for AirAsia victims
Seconds later a thick, dark plume of smoke rose beyond the horizon, as people in the video can be heard screaming.
Indonesian air force spokesperson Dwi Badarmanto confirmed a T-50 Golden Eagle fighter plane had crashed during a demonstration.
"Two pilots died," he told news website Detik.
It remains unclear if anyone on the ground was killed or injured.
A major military air show had been underway this weekend in Yogyakarta.
AirAsia plane crash caused by faulty component, crew action
In June, a Hercules C-130 crashed into a residential neighbourhood in Medan, the largest city on Sumatra island, killing 142 people and causing widespread destruction.
COMMENTS
Comments are moderated and generally will be posted if they are on-topic and not abusive.
For more information, please see our Comments FAQ