Pakistan soldiers and officers survey the site after a aircraft on a training flight crashed.

RAWALPINDI (Dunya News) – A military aircraft on a training flight crashed in a built-up area in the garrison city of Rawalpindi early on Tuesday, claiming lives of all five crew members and 13 civilians and setting off a blaze that left a pile of smoking rubble.

A statement from the Pakistani military said the aircraft was on a routine training flight when it crashed near Rabi Plaza but there was no immediate word on the cause of the accident or the type of aircraft involved.

Two pilots and three crew members of the plane were among the dead, whereas 16 others sustained critical wounds.

According to the Inter-Services Public Relations (ISPR), the army personnel who died in the plane crash included Lt Col Saqib and Wasim, Naib Subedar Afzal, Hawaldar Ibne Amin and Rahmat.

Rescue sources informed that the civilians died in the plane crash included Jameel, Rubeena, Zuhaib, Pari, Fatima, Uzma, Bashir, Abdul Hafeez, Rahila, Faizan, Faiza, Abdur Rauf and Amna Bibi.

At least four to five houses were engulfed by fire after the plane crash.

“The plane hit the side of the building and the structure it has crashed into has completely collapsed,’ an army officer at the scene said.

The site, in a village on the edge of an affluent housing development called Bahia Town, was surrounded by military and rescue service vehicles and security officials pushed back a crowd of bystanders.

Funeral prayer for the martyred were held at Chaklaka Garrison where COAS Bajwa, service and retired officers along the family of martyred offered the prayer. 

According to rescue sources, the death toll may further rise as several persons are still trapped in the wreckage. Meanwhile, emergency has been declared in all hospital of Rawalpindi and Islamabad.

Three houses collapsed after the plane crash which five other houses were engulfed by fire.

Military and civilian rescue workers extinguished the fire, leaving the smoking ruins of a house which appeared to have borne the brunt of the crash.

"We have taken 18 dead bodies to hospital... that included 13 civilians and five crew members," said local rescue spokesman Farooq Butt, adding that a further 12 people had been injured in the accident near the capital Islamabad.

"All the bodies are badly burned, so DNA tests are required for identification," he added.

One resident told AFP that the crash happened around 2am.

"I woke to the sound of a huge explosion. I stepped out of my house and saw huge flames and we rushed to the site," said Mohammad Sadiq.

"People were screaming. We tried to help them but the flames were too high and the fire too intense," he said, adding he believed seven members of one family were among the dead.

Another resident Ghulam Khan said he heard the plane as it buzzed over his house, adding the aircraft appeared to be on fire before it crashed.

"The sound was so scary," he added.

An AFP reporter at the scene said smoke was still rising from the wreckage and destroyed homes, while pieces of the plane were visible on a nearby roof.

Hours after the crash rescue workers could be seen combing through the smouldering site, gathering debris and inspecting the scene while ambulances swarmed the area.

Military officials had also cordoned off the crash site while a crowd of residents stood nearby, some of them sobbing.

Prime Minister Imran Khan offered his condolences to the affected families and wished a "quick recovery for the injured", according to a tweet by the Pakistani government.

Pakistan has a chequered aviation safety record, with frequent plane and helicopter crashes over the years.

In 2016, a Pakistan International Airlines plane burst into flames after one of its two turboprop engines failed while travelling from remote northern Pakistan to Islamabad, killing more than 40 people.

The deadliest air disaster on Pakistani soil was in 2010, when an Airbus 321 operated by private airline Airblue and flying from Karachi crashed into the hills outside Islamabad while coming in to land, killing all 152 on board.