Tunisian President Kais Saied called Thursday for his government to take care of "legal" migrants from sub-Saharan Africa while doubling down on controversial remarks that illegal immigration was causing "demographic" change.

"People who are legally in Tunisia should be reassured," Saied said during a meeting with Interior Minister Taoufik Charfeddine on the security situation in the country.

Saied called on state officials to "look after our brothers from sub-Saharan Africa who are in a legal situation", according to a video published on the official presidency website.

But he stressed that "there is no question of allowing anyone in an illegal situation to stay in Tunisia".

"I will not allow the institutions of the state to be undermined or the demographic composition of Tunisia to be changed," he added.

On Wednesday, Tunisian rights groups accused the president of hate speech after he said a day earlier that "hordes" of sub-Saharan African migrants were causing crime and posed a "demographic" threat.

Saied, who has seized almost total power since a dramatic July 2021 move against parliament, had urged his national security council on Tuesday to take "urgent measures" to tackle irregular migration.

A statement from his office, decrying "a criminal plot... to change Tunisia's demographic make-up" without citing any evidence, has sparked an outcry online.

"Hordes of illegal immigrants from sub-Saharan Africa are still arriving, with all the violence, crime and unacceptable practices that entails," Saied told his national security council on Tuesday evening, according to the statement.

Some Tunisians took to social media to accuse the president of outright racism and invoking right-wing conspiracy theories.

Advocacy group the Tunisian Forum for Economic and Social Rights (FTDES) said Wednesday Saied's discourse was "drowning in racism and hatred".

Saied countered on Thursday that those who accused him of racism "want division and discord and seek to damage our relations with our brothers".

According to official figures quoted by the FTDES, Tunisia, which has a population of some 12 million, is home to more than 21,000 nationals from sub-Saharan African countries, most of them having arrived in an irregular situation.