Officials were checking to see if there was any link between the attack and the Olympics, a spokesman for the games organisers said.
China has given repeated warnings of a major "terrorist" threat emanating from Xinjiang, saying that armed groups there were planning to attack the Olympics.
The People's Daily
, the mouthpiece of the ruling Communist party, said in an editorial last month that "the Beijing Olympics is facing a terrorist threat unsurpassed in Olympic history".
Rights groups and members of the ethnic Muslim Uighur population in Xinjiang have, however, accused the government of exaggerating the threat as a pretext to crack down on all forms of dissent.
Xinjiang, a vast area that borders Central Asia, has about 8.3 million Uighurs, and many are unhappy with what they say has been six decades of repressive Chinese rule.
A senior official said last week that one of the main Olympic threats was from the East Turkestan Islamic Movement (Etim) in Xinjiang which has been waging a separatist rebellion against Chinese rule.
Neil Fergus, who was the director of security intelligence at the 2000 Olympics in Sydney, said he was not surprised by the attack but it did not necessarily pose a direct threat to the games.
He said if Etim were involved, it was a small group without infrastructure across mainland China and with only a modest support base in Xinjiang with some of the Uighur people.
"There has been a tightening of the security apparatus around Beijing in recent weeks and in fact recent months and the overlay which the Chinese authorities and Chinese government has prepared for these games is second to none.
"At this stage there's no reason to think that the Beijing Olympic games are any less secure than previous games and in fact they may be the most secure games we've ever seen," he said.
Chinese officials have said other alleged threats to the games are from separatist forces seeking Tibetan independence, the banned Falungong spiritual group and overseas pro-democracy forces.
China has deployed more than 100,000 security personnel to provide security for the games, which begin on Friday and end on August 24.