By Michael Bristow
BBC News, Beijing
China has spent millions of dollars over seven years on its security preparations for this summer's Olympic Games in Beijing.
Chinese officials have vowed to stop demonstrations
It has bought the latest surveillance equipment from across the world, staged anti-terrorism drills and sought advice from the FBI.
But experts believe there is only a low risk that either home-grown or international terrorists will seek to disrupt the Games.
China's massive security operation appears to be aimed at preventing political demonstrations at the Olympics as much as terrorist attacks.
According to a report published by the US-based Security Industry Association (SIA), China will spend $300m (£150m) on security at Olympic venues.
It has received a range of hi-tech equipment from companies such as General Electric, Honeywell, Panasonic and Siemens, says the report.
Olympic sites will have airport-style security checks, with X-ray machines, metal detectors and scanners for body searches.
Surveillance cameras have also been installed throughout China's capital city.
"The Olympic Games not only showcase world-class athletes, they showcase world-class security technologies and services from our industry," said SIA's Richard Chace.
China has also spent time and effort training its security forces.
Last summer, security teams staged a drill in the city of Dalian in which police stormed a plane after a simulated hijacking.
Many people in Xinjiang are Muslim Uighurs
In the scenario, the hijackers were from China's restive Xinjiang province where many ordinary people resent Beijing's rule.
Those preparations appeared spot on earlier this week when China announced that police had foiled a planned attack on a passenger plane from Xinjiang.
At the same time, an official said a Xinjiang group which police had raided in January had been planning an Olympics-related terrorist attack.
But Steve Vickers, a Hong Kong-based security analyst, said there was only a low to medium risk that terrorists would strike at the Olympics.
"China is in a much better position than other venues that have hosted the Olympics, as there are very few home-grown terrorist groups," he said.
There are terrorist threats from Xinjiang but they are small-scale, added Mr Vickers, the former head of criminal intelligence at Hong Kong police.
But it seems China's security machine is not just directed against potential terrorists - it also appears to be targeted at political and religious campaigners.
These groups are already trying to use the Olympics to highlight a range of issues, such as China's Darfur policy or the country's human rights situation.
Chinese officials have said they will prevent demonstrations staged both inside and outside Olympic venues.
And human rights groups say the security services have already started targeting Chinese activists ahead of the games.
Last week, lawyer Teng Biao said he was bundled into an unmarked car by security officials, who put a bag over his head and drove him away to an undisclosed location.
Mr Teng said he was questioned about several articles he had written criticising China's human rights record, and warned not to speak out again about rights issues.
He said he was then released. Asked whether he would comply with the order, Mr Teng said: "I will have to. I have no choice."
Mr Vickers said China would have to be wary about over-reacting to protests during the Olympics.
"Two hundred people revealing T-shirts with Falun Gong written on them at an event will be a problem, but it's not really terrorism," he said.
Falun Gong is a spiritual movement that was banned by the Chinese government, which says the group is an "evil cult".
Some argue that China is deliberately exaggerating the terrorist threat to the Olympics to crack down on groups within the country.
"We urge the international community to use extreme caution when evaluating any [Chinese] claims of terrorism," said Rebiya Kadeer, president of the Uighur American Association.
Uighurs are the main ethnic group in Xinjiang.
Ms Kadeer said Beijing has not provided evidence to back up its claim that a Xinjiang group was planning an attack on the Olympics.
But China is convinced the threats to the Olympics are real, and has promised to strike first against any group planning to disrupt the games.
"The Olympic Games is a big event, but there are always a few people who conspire [to] sabotage," said one official.
"We are prepared to strike whenever their conspiracies are detected."