By Alistair Scrutton

STOCKHOLM (Reuters) - Sweden's biggest security threat comes from around 200 Islamists in the country with the potential for involvement in militant attacks, including young people radicalized after joining the war in Syria, the state's spy chief said.

Increasing Russian espionage and signs of "war planning" from Moscow since the Ukraine crisis took second place in Sweden's overall security assessment - although it did not see any increased immediate threat, Anders Thornberg said.

Sweden has long taken a standoffish position in international affairs, avoiding even the world wars of the last century. But military roles in Afghanistan and missions to Mali have undermined that formal neutrality and made Sweden more of a target, said Thornberg, who has spent over two decades at SAPO.

"We are talking about a couple of hundred people that are supporting or are willing and capable to carry out terrorist attacks in Sweden or planning a terrorist attack in Sweden against targets in neighboring countries or other places in the world," Thornberg told Reuters.

Thornberg, head of the SAPO security police, said there were more radicalized Swedes involved in Syria over the past two years than in the past 10 years of other insurgent campaigns.

Several Western states have voiced concern about the risk from youths returning home trained for jihad after joining disparate rebel groups, which include foreign al Qaeda insurgents, in Syria.

"It's a huge threat," Thornberg said. "We have seen through the years before that a lot of people were traveling to Afghanistan, to Yemen, Somalia, other countries, learning how to do jihad."

"But it was over a period over 10 years. Now in just two years we have seen more people than totally in the last 10 years," he added. "We haven't seen anything like this before."

RUSSIAN INTELLIGENCE

A botched suicide bomb attack four years ago in Stockholm, and the conviction in 2012 of three Swedes for plotting to kill people at a Danish newspaper in revenge for its publication in 2005 of cartoons of the Prophet Mohammad, showed Sweden was not immune to attacks.

Story continues

The SAPO chief said "two or three" plots had been foiled in the past few years.

The SAPO head said about 80 Swedes had traveled from Sweden to Syria to fight in al Qaeda-inspired or linked groups, of which around 20 had been killed. Some Swedes have returned from the Syrian war for treatment for wounds, and even for holidays.

"We can see a new situation. Before they were different groups. Now they have a common goal in Syria. They are first, second, even third generation immigrants, young men, some have failed a little bit in school, some are minor criminals. Some are totally innocent young boys," he said.

Sweden's worst riots for years, last May, underscored the Nordic state's struggle to integrate a record number of immigrants and challenged its open door traditions. An anti-immigrant party, the Sweden Democrats, won nearly 10 percent of votes in the EU parliamentary election, their best performance.

Thornberg said Sweden had seen increased Russian intelligence activity in the country since the Ukraine crisis.

"I would use the term 'war planning' against Sweden," the SAPO head said, referring to agent recruiting and field operations. "I think Russian intentions may be very long term and do not pose an increased threat in the immediate future, but it's ongoing day after day, year after year."

"They are planning for a worst case scenario in the future, they are planning because intelligence must continue in war time ... they must hide their intelligence activities."

There has been increasing talk from Swedish policymakers about whether to join NATO since Russia seized Crimea. Deputy Prime Minister Jan Bjorklund has called for a "doctrinal shift" in defense policy.

"Russia is the only country in Sweden with full spectrum coverage. They have all the intelligence areas, politics, economics, industry, technology, military defense, dissidents... I think Russian espionage is more extensive than the general public in Sweden is aware of," Thornberg said.

Cyber espionage was also a new threat, with Russia, Iran, and China the main countries involved. Thornberg said many companies with contracts for government work as well as and government authorities were still not fully aware of the risks.

"We have around 15 countries that have intelligence representation in Sweden," Thornberg said. "Ten of them are sometimes committing unlawful intelligence activities or committing espionage."

(Editing by Alison Williams)