The pilot, co-pilot and five trainees aboard the Fokker F-27 were on a routine training flight when it crashed into houses in a neighborhood about 1.5 kilometers (nearly a mile) from the runway where it was trying to land, Indonesian military spokesmen said.
Raging orange flames jumped several meters into the air and a huge column of black smoke billowed over the eight homes damaged in the crash in eastern Jakarta.
Twelve people were injured, two of them critically.
"I could hardly believe my eyes. There was a military plane that crashed and hit the houses!" said Hendra, a resident of the air force complex who goes by only one name. "At once, the situation turned into chaos. All the residents fled in panic. Women and children were screaming hysterically."
He said he helped at least five injured people, mostly with burns, to a nearby air force hospital.
Six of the people aboard the plane died instantly, and the co-pilot died later while being treated at a hospital, air force spokesman Rear Adm. Azman Yunus said.
The plane broke into two parts as it ripped through the houses and plummeted to the ground, said air force spokesman Col. Agus Sasongko Jati. The three people killed on the ground were two children in one of the houses, aged 2 and 6, and a woman who worked as their caretaker, he added.
The aircraft, which was built in 1958 and has been used by Indonesia's air force for the past 35 years with 14,900 flight hours, was declared airworthy before it took off for its second training flight of the day under clear skies, he said.
"It seemed that the pilot was trying to land on a nearby paddy field," Jati told The Associated Press. "But it was not clear whether it was because of an emergency."
A running text on TVOne said the black boxes of the ill-fated plane have been discovered, but Jati did not confirm.
Rescuers halted searching until Friday for more possible victims among the charred rubble of the burning houses, and a number of ambulances were parked inside the air force's Rajawali Complex.
The crash comes after a Russian Sukhoi passenger jet crashed last month into an Indonesian volcano during a demonstration flight for potential buyers, killing all 45 people aboard.