The attack is believed to be one of the worst in Xinjiang
Sixteen Chinese policemen have been killed in an attack on a border post in the restive Muslim region of Xinjiang, state media say.
Two attackers reportedly drove up to the post in a rubbish truck and threw two grenades, before moving in to attack the policemen with knives.
The attack came four days before the opening ceremony of the Olympic Games.
Both attackers were captured during the raid near the city of Kashgar, Xinhua state news agency reported.
Kashgar, known as Kashi in Chinese, is some 2,500 miles (4,000km) from Beijing, near the border with Tajikistan.
Xinhua said the attack happened at about 0800 (0000 GMT), as the policemen were jogging outside the compound.
Although the episode happened a long way away from Beijing, the very fact that it happened, and the fact that it happened this week, will make the organisers of the Beijing Olympics nervous, says the BBC's James Reynolds in Xinjiang.
Fourteen policemen died at the scene of the attack and two on the way to hospital. Another 16 policemen were hurt.
One of the attackers was reported to have been injured in the leg.
Xinjiang, in the north-west of the country, is home to the Muslim Uighur people. Uighur separatists have waged a low-level campaign against Chinese rule for decades.
Human rights groups say Beijing is suppressing the rights of Uighurs.
China has spoken in the past of what it calls a terrorist threat from Muslim militants in Xinjiang, but it has provided little evidence to back up its claims, says the BBC's Daniel Griffiths in Beijing.
A spokesman for the Beijing Games Organising Committee told Xinhua he was confident that Olympic participants and spectators would be safe.
"China has focused on strengthening security and protection around Olympic venues and at the Olympics Village, so Beijing is already prepared to respond to any threat," Sun Weide was quoted as saying.
Last week, a senior Chinese army officer warned that Islamic separatists were the biggest danger to the Olympics.
Ethnically Turkic Muslims, mainly in Xinjiang
Made bid for independent state in 1940s
Sporadic violence in Xinjiang since 1991
Uighurs worried about Chinese immigration and erosion of traditional culture
Col Tian Yixiang of the Olympics security command centre told reporters the main threat came from the "East Turkestan terrorist organisation".
The term is used by the government to refer to Islamist separatists in Xinjiang.
Late last month a group called the Turkestan Islamic Party said it had blown up buses in Shanghai and Yunnan, killing five people.
But China denied that the explosions were acts of terrorism.
The Washington-based IntelCenter, which monitors terrorism communications, said the Turkestan Islamic Party had released a video entitled Our Blessed Jihad in Yunnan.
In it, the group's leader, Commander Seyfullah, said it was responsible for several attacks and threatened the Olympics.
"The Chinese have haughtily ignored our warnings," IntelCenter quoted him as saying.
"The Turkestan Islamic Party volunteers... have started urgent actions."
In Beijing, Chinese police and a small group of protesters clashed in Qianmen district, near Tiananmen Square.
The demonstrators complained that they had been evicted from their homes to make way for the reconstruction of the district.
The Olympic torch is due to be carried round a stadium in Mianyang, Sichuan province, which was used to house thousands of people forced from their homes by a devastating earthquake in May.
The torch will go on to the provincial capital in Chengdu on Tuesday before heading to Beijing for the opening ceremony on Friday.
Are you in the area? Have you been caught up in events? Please send us your comments using the form below:
Send your pictures to firstname.lastname@example.org, text them to +44 7725 100 100 or you have a large file you can upload here.
Read the terms and conditions
At no time should you endanger yourself or others, take any unnecessary risks or infringe any laws.
The BBC may edit your comments and not all emails will be published. Your comments may be published on any BBC media worldwide.