Fires, damaged homes and debris were visible in Mora Kalu village on the outskirts of Rawalpindi after daybreak. After rescue efforts ended, troops and police cordoned off the residential area to search for plane debris and investigate the crash site.
Rescue officials said there were no survivors on the plane and that 13 civilians were killed on the ground. The army said in a statement that five crew members, including two pilots, died in the crash.
Farooq Butt, an official at the state-run emergency service, said 15 people were also injured in the crash. There were concerns the death toll could rise further since some of those injured were in critical condition.
"We have moved all the bodies and injured persons to hospitals," Butt told The Associated Press. "Most of the victims received burn injuries."
He added that there were children among the dead.
Residents said they woke up when they heard an explosion and saw debris of a burning plane near their homes. Army helicopters were seen hovering over the crash site later.
Pakistan's President Arif Alvi and Prime Minister Imran Khan in separate statements expressed their condolences.
The military said the army aircraft was on a routine training flight when it crashed, but had no information on the possible cause. An investigation was underway.