Philippine President Rodrigo Duterte has assured troops that he will protect them from any legal action if they accidentally kill civilians while battling militants who have besieged a southern city.
Mr Duterte ordered the army to destroy the militants aligned with the Islamic State group who attacked Marawi on May 23, sparking fighting that has left more than 400 combatants and civilians dead.
On Wednesday, retrieval teams recovered 17 more bodies believed to be those of villagers killed by the militants in an area of Marawi that has returned to government control.
Mr Duterte said in a televised speech that troops do not intend to kill civilians, but they should "not hesitate to engage just because there are civilians".
"It is the duty of the civilians to flee or seek cover," he said.
He assured the troops that he would fight to keep them out of prison for accidental deaths.
"We will face charges, sometimes massacre, you know a bullet hits through and through, one squeeze of the Armalite, it bursts out about three, four.
"Keep on pressing it," Mr Duterte said.
He declared martial law in the southern Philippines to deal with the Marawi crisis, in which hundreds of militants stormed into the predominantly Muslim city, occupied buildings, took a Roman Catholic priest and others hostage and hoisted IS-style black flags.
He warned that if militants gathered elsewhere, he would consider taking more emergency steps, including empowering law enforcers to make warrantless arrests.
"And my orders to you, if he carries a gun, he is not a soldier, he is not a policeman, just kill him.
"That is my order, because they will kill us," Mr Duterte told the troops.
Such remarks have alarmed human rights groups, which have already expressed concern over the killings of thousands of suspected drug dealers and users under a crackdown on illegal drugs that Mr Duterte launched after taking office last June.
US-based Human Rights Watch described Mr Duterte's first year in power as a "human rights calamity".
"President Duterte took office promising to protect human rights, but has instead spent his first year in office as a boisterous instigator for an unlawful killing campaign," Phelim Kine, the group's deputy Asia director, said in a statement.
Mr Duterte has denied condoning extrajudicial killings but has openly threatened drug and terrorism suspects with death.
If the 17 bodies discovered in Marawi on Wednesday turn out to be those of villagers killed in the conflict, it would bring the number of civilian deaths to 44 and the overall death toll to more than 400.
At least 299 militants and 71 soldiers and police have been killed in the violence.
Mr Duterte apologised to troops for the military casualties and said he was sad each night as he reads a report about Marawi and learns "how many soldiers I have lost for the day".
"I really wallow in sorrow, because I'm the one who ordered you to go there and fight, that is the moral burden that I carry all day and all night," he said.