* Increased terrorism threat is medium-term, judge says
* France investigating links to Mali "terrorist" cells
* Syrian war also a potential risk
By Alexandria Sage and John Irish
PARIS, Jan 25 (Reuters) - The rise of Islamist militants in Mali has been "a rallying cry" for potential jihadists in France, but an attack on French soil is unlikely in the short term, France's top anti-terrorism judge said on Friday.
France launched air strikes and deployed thousands of ground troops in Mali this month to drive back al Qaeda-linked rebels it fears will turn its former colony into a launch pad to attack French political and economic interests.
"Now they (Islamists) consider us public enemy number one," said Marc Trevidic, France's most senior examining judge in charge of investigating terrorism.
"They think French troops are fighting Islam so of course they are going to try and fight us," Trevidic told Reuters in an interview. "But not immediately."
France's judicial system has already opened a few preliminary investigations involving individuals suspected of links to Malian "terrorist" cells in recent weeks, Trevidic said.
In November, French prosecutors said they were investigating a French man suspected of illegally entering Mali to set up a jihadist cell.
France - which has Europe's largest Muslim population of about five million - has not fully recovered from the killing in March 2012 of seven people in southern France by an al Qaeda-inspired gunman, French citizen Mohamed Merah.
That was the deadliest such attack France had suffered since 1995, when the Algerian Armed Islamic Group killed eight people and wounded dozens in a bomb attack in a Paris metro station.
Trevidic, in charge of many of France's big anti-terrorism cases since 2000, said that the risk of an imminent attack on French territory was low, as security levels and surveillance had been tightened.
"They're lying low," Trevidic said. "The danger isn't short term, it's medium term."
The civil war in Syria poses a similar threat to France. Trevidic said there were some 50 French nationals fighting there against President Bashar al-Assad's government.
While Paris supports the rebel insurgency, the presence of those individuals could complicate France's anti-terrorism efforts, as some of them could also be radical Islamists, he said.
"We don't know exactly what groups they are fighting with. It's difficult to say that a young guy who came to Syria to fight Assad is a terrorist," he said. "It's possible that he may be a terrorist in the future, but it's not obvious now." (Editing by Robin Pomeroy)