Philippine President Rodrigo Duterte has ordered the expulsion of a 71-year-old Australian nun, giving her 30 days to leave the country after she reportedly joined protest rallies against his government.

Sister Patricia Fox, who has lived in the Philippines for nearly three decades, has had her missionary visa revoked after apparently speaking out against Duterte at demonstrations in southern Davao City.

She has been labeled an "undesirable" foreigner for what the country's Bureau of Immigration says is "her involvement in partisan political activities."

The bureau did not elaborate on the nature of her activities, but in a speech to soldiers last week, Duterte accused Fox of bad-mouthing his administration, Reuters reports.

"You do not have that right to criticize us. Do not insult my country," Duterte said, according to the news agency, which said the president's spokesman "showed journalists photos of [Fox] speaking at farmer and laborer protest rallies in the president's hometown in southern Davao City early this month."

Fox, a mother superior belonging to congregation of Catholic nuns known as the Notre Dame de Sion, said in a statement that she was surprised by the order and that she hoped authorities would change their minds before the 30 days was up.

Fox said Monday that she was detained taken from her house and detained for 24 hours last week by the Philippine immigration officials.

She told Australia's ABC TV: "For me, it is part of my mission as a Catholic sister to stand beside those whose human rights have been violated, who are asking for help."

Since taking office in 2016, Duterte has pressed a deadly anti-drug campaign rife with extrajudicial killings that Human Rights Watch said in January had killed more than 12,000 people.

Copyright 2018 NPR. To see more, visit http://www.npr.org/.