"They have entered not only with the intention of stirring up violence, but also to integrate this separatist idea of a part of our region in the country," Chavez told a press conference.

Chavez did not specify the nationalities of those who entered the country, but in an interview with local TV on Wednesday he said he had reported the presence of five Bolivians at a protest in the border region of Puno.

He said the government was working on legal actions against those who allegedly crossed the border clandestinely.

In Puno, and other parts of the historically left-voting south, some protest leaders are talking about separating from Lima and northern Peru.

Peru's protests began early December after Castillo was removed from office and then detained after illegally trying to dissolve Congress.

Crowds took to the streets demanding the resignation of new President Dina Boluarte, the closure of Congress, a change to the constitution and Castillo's release. Protests restarted Wednesday after a lull over the Christmas and New Year period.

Boluarte told local media on Wednesday that she was working with immigration officials to decide whether Bolivia's former President Evo Morales, a fierce critic of Peru's new government and supporter of Castillo, should be allowed in the country.

Morales, who visited Peru several times during Castillo's term, on Thursday again lashed out at Boluarte and the violence at the protests, which has left 22 people dead in clashes and another six dead in accidents linked to road blockades.

"Please stop the massacres, illegal detentions, persecution and accusations of terrorism against our indigenous brothers and sisters," Morales said on Twitter, calling for "deep transformation".

Peruvian Prime Minister Alberto Otarola said on Thursday that Peru rejects any attempts at foreign "interference" attempts and that officials were carefully observing the border region.

(Reporting by Marco Aquino; Writing by Sarah Morland; Editing by Raju Gopalakrishnan)