MANILA (Reuters) - Philippine President Rodrigo Duterte warned on Monday that Islamic State militants driven out of Syria and Iraq could set up in his country, and if that happened he would forego human rights obligations to keep his people safe.

Duterte said the southern Philippine province of Mindanao was already a hotbed of rebellion and banditry and he was worried about "looming terrorism" and an influx of extremists who could exploit the insecurity.

"Once the terrorists of the Middle East are deprived of the land area, the real estate area where they can sleep ... they will wander to other places and they will come here and we have to prepare for that," he said during a speech at a law enforcement agency.

"Remember, these guys, they do not have an iota of what is human rights, believe me. I will not just simply allow my people to be slaughtered for the sake of human rights, that's bullshit."

Human rights have been a touchy subject for Duterte, who has vented daily fury at activists and Western governments that have shown concerns about his war on drugs and the high death toll.

A native of Mindanao and mayor of Davao City for 22 years, Duterte said there was a "very strong" Islamist rebellion there and Abu Sayyaf rebels were taking hostages almost every day.

Abu Sayyaf is holding 21 captives, most of them foreign, and despite an ongoing military offensive to wipe them out, its piracy and kidnappings continue unabated.

Duterte said the Philippines, Indonesia and Malaysia were working closely to keep foreign extremists at bay.

On Friday, he warned that he may use his executive power to tackle lawlessness in the Philippines by suspending habeas corpus, a legal safeguard against arbitrary arrest and detention.

The constitution allows 60-day suspensions "in case of invasion or rebellion, when the public safety requires it" and would permit arrests without warrant and detention without charge for three days.

Duterte mentioned habeas corpus on Friday in the context of both the southern unrest and his war on drugs and said building cases for arresting suspects took too much time and resources.

The president's office on Monday issued a statement saying Duterte was giving a stern warning to those behind violent acts that he could take "more drastic action" to stop them.

(Reporting by Martin Petty; Editing by Nick Macfie)