* Top anti-terrorism judge says ingredients for attacks in place
* Says French Muslims of sub-Saharan origin joining Qaeda in Mali
* Says French need to realise some attacks will succeed
By John Irish
PARIS, Jan 6 (Reuters) - The insurgency that has seized the north of Mali is paving the way for attacks on France as more French Muslims of African origin are finding a cause in the conflict, Paris's top anti-terrorism judge warned on Sunday.
As Mali's former colonial ruler, France fears al Qaeda's north African arm, AQIM, is cementing a base in the West African state that would provide a launch pad against French political and economic interests at home and abroad.
"We have a very large Malian community in France, but also from sub-Saharan Africa as a whole," Marc Trevidic said in a rare interview with weekly newspaper Le Journal du Dimanche. "These 'black' French Muslims who were suffering from latent racism from 'Arabs' have for the first time found their jihad."
Diplomatic sources have said a handful of French nationals had travelled to the Sahel region to train for Islamic jihad, or holy struggle. Trevidic said four investigations were open on what he called Malian "terrorist" cells.
"They are young, often dual nationals or who have links with sub-Saharan Africa," he said. "They get in either through Niger or Algeria, but many are Malians who can go and visit their families and don't need visas."
France has been a vocal supporter of plans for an international operation to try to wrest back northern Mali from Islamist insurgents, who hold eight French hostages in the area.
In December, the U.N. Security Council authorised a French-drafted resolution to deploy an African-led force to retrain Mali's defeated army and support an anti-insurgent mission, although no ground operations are expected until later in 2013.
"All the ingredients exist so that there are repercussions on our soil," the judge said. "France is backing those that want to intervene militarily in Timbuktu. So we are the enemy and are identified as such."
TERRORISM HERE TO STAY
Despite past differences with Washington and London over Middle East policy, France has long been a target for Islamist militants because of its colonial record in North Africa and problems integrating its large Muslim minority.
Numbering five million, France's Muslim community is the biggest in the 27-member European Union but many are marginalized with poor job prospects in grim, violence-ridden suburbs and housing estates.
But until Mohamed Merah, a young al Qaeda-inspired gunman, killed seven people including three Jewish children in southwestern France last March, France had not suffered a major attack since 1995 when the Algerian Armed Islamic Group killed eight people and wounded dozens bombing a Paris metro station.
Trevidic said the French had to get used to the idea that terrorism was here to stay and could not be eradicated.
"We will have to accept this reality without deluding ourselves. It means we have to accept that attacks will succeed and there will be deaths."
France's success at dodging attacks is in large part due to its water-tight security apparatus and legal infrastructure.
The Renseignements Generaux agency, which was merged in 2008 with the Direction de la Surveillance du Territoire (DST) to create the Direction Centrale du Renseignement Interieur (DCRI), was set up a century ago with a loose and secretive mandate to track radical groups that could harm the state. It now works hand in hand with the DGSE foreign intelligence service.
This security layer is backed up by some of Europe's toughest anti-terror laws.
French investigating magistrates have far-reaching powers and can approve search warrants or order wiretaps. People can also be arrested under broad "suspicion of conspiring in relation to terrorism" legislation, enabling authorities to hold and question a person over even minor concerns. (Reporting By John Irish; Editing by Mark Heinrich)