Philippine soldiers ride in the back of a truck as they leave a military camp in Marawi, on the southern island of Mindanao on May 25, 2017, to reinforce soldiers at the battlefront in the city centre days after Muslim extremists attacked the city.
Philippine troops aboard helicopters and in armoured tanks battled Islamist militants inside a southern city on May 25, as reports emerged of the gunmen murdering civilians. / AFP PHOTO / TED ALJIBE        (Photo credit should read TED ALJIBE/AFP/Getty Images)
TED ALJIBE/AFP/AFP/Getty Images
Philippine soldiers ride in the back of a truck as they leave a military camp in Marawi, on the southern island of Mindanao on May 25, 2017, to reinforce soldiers at the battlefront in the city centre days after Muslim extremists attacked the city. Philippine troops aboard helicopters and in armoured tanks battled Islamist militants inside a southern city on May 25, as reports emerged of the gunmen murdering civilians. / AFP PHOTO / TED ALJIBE (Photo credit should read TED ALJIBE/AFP/Getty Images)
Now playing
01:57
Martial law order creates ghost island
RTVM
Now playing
01:34
See $5.5M worth of luxury vehicles get crushed
Now playing
01:02
Duterte's 'misogynist' kiss sparks anger (2018)
Now playing
02:34
Trump, Duterte meet during ASEAN summit
Philippine President Rodrigo Duterte gestures as he answers questions from the press at Manila International Airport on March 23, 2017.  
Duterte warned he may impose martial law and suspend elections for tens of thousands of local posts, fuelling concerns about democracy under his rule. Duterte said he was considering both measures as part of his controversial campaign to eradicate illegal drugs in society, and that martial law would also solve a range of other security threats. / AFP PHOTO / NOEL CELIS        (Photo credit should read NOEL CELIS/AFP/Getty Images)
NOEL CELIS/AFP/AFP/Getty Images
Philippine President Rodrigo Duterte gestures as he answers questions from the press at Manila International Airport on March 23, 2017. Duterte warned he may impose martial law and suspend elections for tens of thousands of local posts, fuelling concerns about democracy under his rule. Duterte said he was considering both measures as part of his controversial campaign to eradicate illegal drugs in society, and that martial law would also solve a range of other security threats. / AFP PHOTO / NOEL CELIS (Photo credit should read NOEL CELIS/AFP/Getty Images)
Now playing
01:00
Philippines president slams Kim Jong Un
Philippine President-elect Rodrigo Duterte speaks during his first press conference since he claimed victory in the presidential election, at a restaurant in Davao City, on the southern island of Mindanao on May 15, 2016.
Duterte vowed on May 15 to reintroduce capital punishment and give security forces "shoot-to-kill" orders in a devastating war on crime. / AFP / TED ALJIBE        (Photo credit should read TED ALJIBE/AFP/Getty Images)
TED ALJIBE/AFP/Getty Images
Philippine President-elect Rodrigo Duterte speaks during his first press conference since he claimed victory in the presidential election, at a restaurant in Davao City, on the southern island of Mindanao on May 15, 2016. Duterte vowed on May 15 to reintroduce capital punishment and give security forces "shoot-to-kill" orders in a devastating war on crime. / AFP / TED ALJIBE (Photo credit should read TED ALJIBE/AFP/Getty Images)
Now playing
01:21
This man compares himself to Hitler
philippines marawi duterte isis watson lklv_00002523.jpg
philippines marawi duterte isis watson lklv_00002523.jpg
Now playing
01:31
Philippines President begs for forgiveness
philippines death squad testimony ripley_00001218.jpg
philippines death squad testimony ripley_00001218.jpg
Now playing
02:18
Duterte's Davao death squad investigated
duterte swerves towards china _00013521.jpg
duterte swerves towards china _00013521.jpg
Now playing
04:13
Philippines' Duterte pivots towards China
Philippine President-elect Rodrigo Duterte speaks during his first press conference since he claimed victory in the presidential election, at a restaurant in Davao City, on the southern island of Mindanao on May 15, 2016.
Duterte vowed on May 15 to reintroduce capital punishment and give security forces "shoot-to-kill" orders in a devastating war on crime. / AFP / TED ALJIBE        (Photo credit should read TED ALJIBE/AFP/Getty Images)
TED ALJIBE/AFP/Getty Images
Philippine President-elect Rodrigo Duterte speaks during his first press conference since he claimed victory in the presidential election, at a restaurant in Davao City, on the southern island of Mindanao on May 15, 2016. Duterte vowed on May 15 to reintroduce capital punishment and give security forces "shoot-to-kill" orders in a devastating war on crime. / AFP / TED ALJIBE (Photo credit should read TED ALJIBE/AFP/Getty Images)
Now playing
01:15
President Duterte: 5 outrageous quotes
BEIJING, CHINA - OCTOBER 20: President of the Philippines Rodrigo Duterte and Chinese President Xi Jinping review the honor guard as they attend a welcoming ceremony at the Great Hall of the People on October 20, 2016 in Beijing, China. Philippine President Rodrigo Duterte is on a four-day state visit to China, his first since taking power in late June, with the aim of improving bilateral relations.  (Photo by Thomas Peter-Pool/Getty Images)
Pool/Getty Images AsiaPac/Getty Images
BEIJING, CHINA - OCTOBER 20: President of the Philippines Rodrigo Duterte and Chinese President Xi Jinping review the honor guard as they attend a welcoming ceremony at the Great Hall of the People on October 20, 2016 in Beijing, China. Philippine President Rodrigo Duterte is on a four-day state visit to China, his first since taking power in late June, with the aim of improving bilateral relations. (Photo by Thomas Peter-Pool/Getty Images)
Now playing
02:37
Philippine President announces separation from US
Philippine President-elect Rodrigo Duterte speaks during his first press conference since he claimed victory in the presidential election, at a restaurant in Davao City, on the southern island of Mindanao on May 15, 2016.
Duterte vowed on May 15 to reintroduce capital punishment and give security forces "shoot-to-kill" orders in a devastating war on crime. / AFP / TED ALJIBE        (Photo credit should read TED ALJIBE/AFP/Getty Images)
TED ALJIBE/AFP/Getty Images
Philippine President-elect Rodrigo Duterte speaks during his first press conference since he claimed victory in the presidential election, at a restaurant in Davao City, on the southern island of Mindanao on May 15, 2016. Duterte vowed on May 15 to reintroduce capital punishment and give security forces "shoot-to-kill" orders in a devastating war on crime. / AFP / TED ALJIBE (Photo credit should read TED ALJIBE/AFP/Getty Images)
Now playing
02:03
China, Philippines sign bilateral agreements
philippines duterte china summit visit rivers pkg_00002328.jpg
philippines duterte china summit visit rivers pkg_00002328.jpg
Now playing
02:22
Philippine president visits China for key summit
Duterte
Reuters
Duterte
Now playing
02:05
Duterte tells Obama to 'go to hell'
Front-running presidential candidate Mayor Rodrigo Duterte gestures during his second news conference after voting in a polling precinct at Daniel R. Aguinaldo National High School, Matina district, his hometown in Davao city in southern Philippines Monday, May 9, 2016. Duterte was leading by a wide margin in unofficial tallies but still refuses to claim victory. (AP Photo/Bullit Marquez)
Bullit Marquez/AP
Front-running presidential candidate Mayor Rodrigo Duterte gestures during his second news conference after voting in a polling precinct at Daniel R. Aguinaldo National High School, Matina district, his hometown in Davao city in southern Philippines Monday, May 9, 2016. Duterte was leading by a wide margin in unofficial tallies but still refuses to claim victory. (AP Photo/Bullit Marquez)
Now playing
02:56
Who is Rodrigo Duterte?

Story highlights

Battle rages in southern Philippines city

Official: Foreign jihadists invade Mindanao

CNN —  

Philippines President Rodrigo Duterte, giving a pep talk to his troops in the country’s restive south, exhorted the soldiers to go all out in fighting Islamic militants and joked that under martial law they could even commit rape with impunity.

“The consequences of martial law and the ramifications of martial law, I and I alone would be responsible. Just do your jobs, I’ll take care of the rest,” he told his soldiers on Friday while visiting Iligan City in the country’s Mindanao region.

He then warned against committing human rights violations, before joking: “If you rape three people, I will admit that I did it.”

Duterte, who is known for making crass statements and his violent war on drugs, declared martial law earlier this week after ISIS declared a “wide-scale offensive on positions of Philippine troops in the city of Marawi.”

However, he also said that he was open to dialogue with the terrorist group.

“If they want to talk, I will be most thankful to Allah that we talk about peace,” Duterte said Friday. “If they insist on fighting, we can’t do anything. Go for it and you have my full support.”

Fighting flared this week

Fighting between government forces and the Maute group, an Islamist militant organization based in Mindanao, began Tuesday afternoon in Marawi, a city of about 200,000 people. The clashes between Filipino government troops and the Islamist militants have been deadly. A spokesman confirmed that the fighters had taken over several government buildings in the city, and had torched others, including a church, a school and the city jail.

The violence prompted Duterte to cut short a visit to Moscow, during which one of his top priorities was to acquire Russian-made precision armaments to use against the militants.

Duterte declared martial law, which covers both the city of Marawi and the wider island of Mindanao, of which Marawi is a part.

Mindanao is home to a sizable Muslim population, in contrast to the remainder of the country, which is overwhelmingly Catholic.

The media wing of ISIS, the Amaq News Agency, put out a statement announcing that “fighters of the Islamic State launch a wide-scale offensive on positions of Philippine troops in the city of Marawi.”

A history of rape jokes

In his speech to the troops, Duterte said ISIS “is here already” and flying its flags. And he urged the soldiers to take tough measures, such as arresting anyone or searching any house.

He said he is tapping resources, “scraping the bottom of the barrel to look for money to see you through.” He said governmental planes are at their disposal for the wounded to be transported and the best medical equipment is available.

Duterte’s joked about rape while expressing his support for the soldiers. It was not the first time the president quipped about the subject.

While running for office in 2016, Duterte joked about the 1989 rape and murder of an Australian missionary that took place in Davao City, in the country’s southeast, where he was mayor, CNN Philippines reported.

“I was angry she was raped, yes that was one thing. But she was so beautiful, I think the mayor should have been first. What a waste,” he said during a campaign rally, according to a CNN Philippines translation of the comments.

After drawing international condemnation from women, human rights organizations, political critics and celebrities in the Philippines, Duterte issued an apology.

“I apologize to the Filipino people for my recent remarks in a rally. There was no intention of disrespecting our women and those who have been victims of this horrible crime,” he said.

A sharp criticism

Phelim Kine, deputy Asia director of Human Rights Watch, deplored Duterte’s latest remark, telling CNN it “referenced the crime of rape as an acceptable practice for men with guns and power, this time in comments dressed up as a sickening attempt at humor”

Kine said the comments underscore a message that soldiers “can commit the most serious crimes against Mindanao’s civilian population without any fear of accountability.” He said National Police undertaking Duterte’s “murderous” war on drugs have gotten the same idea.

“Duterte’s pro-rape comments only confirm some of the worst fears of human rights activists that the Duterte government will not just turn a blind eye to possible military abuses in Mindanao, but may actively encourage them,” he said.

Martial law

Martial law will be in effect on the Muslim-majority southern Philippines island for 60 days “to suppress lawless violence and rebellion and for public safety,” said Presidential spokesman Ernesto Abella, according to the Philippine News Agency.

Duterte said martial law in the southern Philippines could last a year. and remarked that the declaration was needed to combat the rise of ISIS.

“If I think that the ISIS has already taken foothold also in Luzon and terrorism is not really far behind, I might declare martial law throughout the country to protect the people,” said the President, at a news conference in Manila, Wednesday.

Foreign fighters

Philippines Solicitor General Jose Calida told reporters on Friday that the declaration of martial law shouldn’t cause alarm for law-abiding citizens. He said it is the President’s duty to crush the rebellion.

But he warned that the Maute group is dangerous and that Mindanao is being invaded by foreign fighters. He said jihadists from Malaysia, Indonesia and Singapore are fighting in Marawi. He said they are claiming Mindanao as part of the caliphate.

“What’s happening in Mindanao is no longer a rebellion of Filipino citizens. It has transmogrified into invasion by foreign terrorists who heeded the clarion call of the ISIS to go to the Philippines if they find difficulty in going to Iraq or Syria… They want to create Mindanao as part of the caliphate,” he said.

CNN’s Zahra Ullah, Andreena Narayan and Spencer Feingold contributed to this report.