At least 29 people were killed and 50 injured July 4 when a Philippine military aircraft carrying troops crashed and burst into flames after missing the runway in the country's south, officials said.

Nearly 100 people, most of them recent army graduates, were on the C-130 Hercules transport plane which was trying to land on Jolo island in Sulu province around midday.

Some of the soldiers were seen jumping out of the plane before it hit the ground and exploded into flames, said Major General William Gonzales, commander of the Joint Task Force-Sulu.

It was one of the country's deadliest military aviation accidents.

"This is a sad day but we have to remain hopeful," Gonzales said in a statement.

"We enjoin the nation to pray for those who are injured and those who have perished in this tragedy."

A search was still under way for 17 missing people.

Photos of the crash site released by the Joint Task Force-Sulu showed the damaged tail and the smoking wreckage of the fuselage's back section laying near coconut trees.

Images published by local media outlet Pondohan TV on its Facebook page showed the wreckage engulfed in flames and a plume of thick black smoke rising above houses located near the site.

Armed Forces Chief General Cirilito Sobejana said the aircraft was carrying troops from Cagayan de Oro on the southern island of Mindanao when it "missed the runway" as it tried to land on Jolo.

The plane tried to "regain power but didn't make it", he told local media.

The four-engine plane crashed near a quarry in a lightly populated area, First Lieutenant Jerrica Angela Manongdo said.