Slideshow ( 12 images )

MANILA (Reuters) - President Rodrigo Duterte of the Philippines, who had avoided public appearances for nearly a week to recover from what spokesmen described as fatigue, said on Saturday that a battle with Islamist militants in Marawi City was winding up, but the insurgency had deep roots.

More than 300 people have been killed in the southern town, where troops have been fighting for over three weeks to oust militants who have sworn allegiance to Islamic State.

“The fighting is going on, but it’s winding up,” Duterte said while addressing soldiers in the town of Butuan, an event covered live on television.

But he added: “It’s difficult to fight those who are willing to die. They have corrupted the name of God in the form of religion to kill many innocent people, for nothing.”

The presence of fighters from the Middle East had made it a brutal conflict, Duterte said.

Duterte had not attended any public event since last Sunday, with his spokesmen saying the president was tired and resting. He did not appear at any function to mark the Philippines’ independence day last Monday, which raised eyebrows.

He appeared to be fine on Saturday, and attended two functions in the southern region of Mindanao, both near his hometown Davao.

“Do not worry,” he told reporters after the event with the soldiers. “My state of health is immaterial. There is the vice president who will take over.”

(Story corrects quote to ‘winding up’ in paragraphs 1 and 3, and rewords headline.)