By Alexei Anishchuk and Alissa de Carbonnel
MOSCOW (Reuters) - Russia's parliament passed a bill on Friday imposing prison terms of up to six years on Russians who take part in conflicts abroad, as the government tries to head off potential security threats ahead of the Winter Olympic Games in Sochi.
Militants waging an Islamist insurgency in southern Russia's North Caucasus region sympathize with the international jihadists trying to overthrow Syrian President Bashar al-Assad.
National security officials estimate that up to 400 people have left Russian territory to fight in Syria and analysts warn they pose a serious threat when they return.
President Vladimir Putin submitted the amendments to the existing anti-terrorism law in September.
Under the amended law, relatives of those committing acts of terrorism will be held financially liable for the damage. It also sets prison terms of up to 20 years for setting up a terrorist organization and up to ten years for being part of it.
The bill was rushed through the State Duma in the second and third reading on Friday, days after a deadly bus bombing killed six people in southern Russia and months ahead of the Games in the Black Sea resort seen as the Kremlin's showcase project.
Sochi is a few hundred kilometers (miles) from the volatile and mountainous North Caucasus, where there is almost daily violence.
Alexey Malashenko, a religion expert at the Carnegie Moscow Centre think tank, said the Russian nationals fighting in Syria could pose a real threat to the Games.
"They will come back trained in warfare...," Malashenko said. "You don't need a lot of people, five to ten people, and there won't be any Olympics."
Russia is a staunch supporter of Assad and says the rebels fighting to topple him are not freedom fighters but terrorists linked to al Qaeda.
Putin has long taken a tough stance against the North Caucausus rebellion after two wars between the Russian army and Chechen separatists. In the second of those wars, from 1999 to 2000, he burnished his reputation as an uncompromising leader.
He has promised tight security at the Games to be held next February. Russia is spending more than $50 billion on the event and Putin sees it as a chance to show the world what his nation can achieve.
(Writing by Alexei Anishchuk; editing by Tom Pfeiffer)