By Kanupriya Kapoor

MARAWI CITY, Philippines (Reuters) - Five decapitated civilians were found in a Philippine city occupied by Islamist rebels on Wednesday, the military said, warning the number of residents killed by rebel "atrocities" could rise sharply as troops retake more ground.

The discovery of the five victims among 17 bodies retrieved would be the first evidence that civilians trapped in besieged Marawi City have been decapitated during the five-week stand by militants loyal to the Islamic State group, as some who escaped the city have previously reported.

Some 71 security forces and 299 militants have been killed and 246,000 people displaced in the conflict, which erupted after a failed attempt on May 23 to arrest a Filipino militant commander backed by Islamic State's leadership.

President Rodrigo Duterte promised to destroy the militants in Marawi and said the Philippines was now dealing with "a very dangerous situation" due to young Muslims inspired by the "mass insanity" of Islamic State.

"All they do is just to kill and destroy, and killing in a most brutal way," he said at an event where he received hundreds of sniper and assault rifles donated by China to help the military campaign in Marawi.

"They enjoy decapitating people in front of cameras. They have to be dealt with, with the same ferocity but not the brutality," he said.

The information about the beheadings came via a text message to reporters from Lieutenant Colonel Emmanuel Garcia of the Western Mindanao Command. Garcia did not respond to repeated requests for details.

A civilian rescue worker, Abdul Azis Lomondot, told Reuters body parts were found, but with "no proof of beheading".

Military spokesman Jo-Ar Herrera said bodies were found separately in two groups, of 12 and five, but he was unable to confirm if the five were beheaded.

The battle entered its 36th day on Wednesday, with intense gunfights and bombing in the heart of the town and black-clad fighters seen from afar running between buildings as explosions rang out.

The rebels' hold on Marawi, while incurring the full force of a military for years trained by its U.S. counterparts, has much of the region on edge, concerned that Islamic State's influence may run deeper than thought.

Those fears are also being felt in Malaysia and Indonesia, whose nationals are among the Maute group of rebels fighting in Marawi, suggesting the group may have built a cross-border network that has gone largely undetected.

RISING TOLL

Military spokesman Restituto Padilla earlier said it was likely that many civilians had been killed and the death toll - at 27 before the latest 17 were announced - was only what the authorities could confirm independently and escapees had reported many in the area of fighting.

"(It) may increase significantly," Padilla told reporters. "There have been a significant number that have been seen."

Padilla said the cause of all of those deaths would be "atrocities committed by the terrorists".

Among those atrocities, the army says, have been residents being forced to loot homes, take up arms or become sex slaves.

Videos have appeared this month on the website of Islamic State's Amaq news agency and its social media channels of hostages in Marawi pleading for their lives, saying they would be beheaded if air strikes were not stopped. Clips have also appeared of kneeling captives, shot in the head from behind.

Reuters was unable to confirm the authenticity of the footage.

The military has so far been reluctant to discuss the possibility that the real impact of the fighting on civilians could be far more severe than has been reported.

It has played down the impact of daily air strikes and mortar assaults aimed at rebel sniper positions, which have reduced areas of the lakeside town to rubble and alarmed people stuck there, some of whom have said the shelling was a bigger threat than the militants.

Military spokesman Padilla said troops needed more time to finish what was a tricky mission, complicated by trapped civilians, hostages and booby traps.

(For a graphic on battle for Marawi, click http://tmsnrt.rs/2sqmHDf)

(Additional reporting by Neil Jerome Morales in MANILA; Writing by Martin Petty)