Military plane crash in Indonesia kills 141 people
Search and rescue personnel work at the crash site of an Indonesian Air force C-130 Hercules aircraft in Medan, northern Sumatra province, on July 1, 2015. Photo by Atar for Agence France-Presse.

The death toll from the crash of an Indonesian air force plane, which had been packed with military personnel and their families, rose to 141 Wednesday as rescuers used heavy machinery to search the debris.

The Hercules C-130 transporter crashed into a residential area in the city of Medan on Tuesday, shortly after taking off from an airbase in the city on Sumatra island.

Buildings were heavily damaged, cars reduced to flaming wrecks and the plane itself was almost completely destroyed, with the tail the only part of the 51-year-old aircraft still recognisable after the disaster.

Many of those on board the flight to an island off Sumatra, which was carrying 122 people, were believed to be servicemen and women and their families. The air force has said no one survived the crash.

It is unclear how many people died on the ground, but a steady stream of bodies has been arriving at a Medan hospital as rescuers pull them from the disaster scene, and police said Wednesday that the total death toll now stood at 141.

Agustinus Tarigan, a police official at the hospital, said so far 45 people had been identified -- 30 air force personnel, six army personnel and nine civilians.

Most of those so far identified "were from the armed forces because they were wearing uniform," he said.

He said officials were working to identify the others by examining "things we found on the bodies of the victims such as ID cards, or a ring".

- Poor air safety record -

The plane smashed into a newly built residential area, ploughing into a massage parlour and a small hotel. The aircraft had asked to turn back just after take off and the air force chief Agus Supriatna has said engine trouble may have caused the accident.

However he also insisted the ageing aircraft was in good condition.

Following the disaster, thousands of anxious residents gathered around a police cordon to view the smouldering wreckage as a huge rescue operation swung into action, with earth movers deployed to shift the towering piles of rubble.

Residents described terrifying scenes just after midday Tuesday as the plane flew low, giving off smoke and then crashing and bursting into flames.

Indonesian President Joko Widodo expressed sorrow at the accident, tweeting that families affected by the disaster must have "patience and strength".

The disaster once again shone a harsh light on Indonesia's poor aviation safety record. It came just six months after an AirAsia plane crashed into the Java Sea, killing all 162 people on board.

It also raised questions about the Indonesian military's aircraft -- it was the sixth fatal crash involving an air force plane in the past decade, according to the Aviation Safety Network.

Following the crash, Supriatna said the military was grounding some of its Hercules transporters.

The plane involved in Tuesday's accident took off at 12:08 pm (0508 GMT) from the airbase and crashed in the city about two minutes later, about five kilometres (three miles) from the base, according to the military.

Medan is the biggest Indonesian city outside the main island of Java and a major economic centre.

It was the second time in a decade that the city has suffered a fatal plane accident. A Mandala Airlines domestic flight crashed shortly after take-off in 2005 into a densely populated suburb, killing at least 150 including passengers, crew and people on the ground.