Philippine President Rodrigo Duterte has visited soldiers in Marawi amid an ongoing operation against Islamic State-inspired militants who occupy parts of the city.

Officials said Duterte spent a few hours inside a military camp in the besieged city and encouraged the troops.

The siege in Marawi has killed more than 500 people, mostly militants, and displaced 250,000 since the conflict started on may 23.

Duterte has asked congress to extend his declaration of martial law on the entire island of Mindanao, where Marawi is located, until the end of the year to rout the insurgencies.