MANILA (Reuters) - The Philippines has revoked the visa of an Australian Catholic nun and ordered her out of the country in 30 days, an immigration official said on Wednesday, after President Rodrigo Duterte complained about her participation in protest rallies.

Patricia Anne Fox, a 71 year-old superior of the Notre Dame de Sion in the Philippines, a congregation of Catholic nuns, was detained for a day last week after President Rodrigo Duterte ordered her investigation for “disorderly conduct”.

Immigration bureau head Jaime Morente issued an order telling Fox she had to leave the Philippines after “she was found to have engaged in activities that are not allowed under the terms and conditions of her visa”.

Fox, who has been in the country for more than 27 years, has 30 days to leave.

Her renewable missionary visa, which was due to expire in September, was cancelled on Monday, but an immigration spokeswoman said she could still return to the mainly Catholic Southeast Asian country as a tourist, not as a missionary.

“We will file a motion for reconsideration on this order,” said Jobert Pahilga, a lawyer for the nun. “She has not participated in any partisan activity. She is a nun.”

The immigration department said she had engaged in activities not allowed under the terms of her visa.

It did not elaborate but Duterte had accused her of violating Philippine sovereignty with criticism of the government. A presidential spokesman recently showed journalists photos of Fox speaking at a rally by farmers and workers.

Fox said in a statement posted on her social media page she was “surprised” about the cancellation of her visa, which she had heard about from media.

“I had thought the process was that I would have 10 days to put in a counter affidavit to answer the charges,” she said.

“I am very sad that the decision at present is that I leave the Philippines. I may lose my right to be in the Philippines but I can never lose the learnings and beautiful memories.”

The left-wing activist group Bayan (Nation) condemned the expulsion order of the nun who “has done so much for Philippine farmers in her nearly three decades stay here”.

“The Duterte regime is paranoid and afraid of an elderly nun working for human rights and social justice for the poor,” Bayan leader Renato Reyes said in a statement.

“The deportation order of Sister Pat is indeed despicable and utterly shameful,” said Reyes.

Duterte said last week he had ordered immigration authorities to look into Fox’s political activity.

“It’s a violation of sovereignty,” Duterte said, accusing Fox of badmouthing his administration. “You do not have that right to criticize us. Do not insult my country.”

The pictures presidential spokesman Harry Roque showed journalists were of Fox speaking at a rally in Duterte’s hometown of Davao early this month.