Updated

U.S. military officials moved to defuse tension after a riot outside their main base by handing six villagers accused of being bombmakers over to local Afghan authorities, officials said Wednesday.

The riot — unusual in an area that has been largely peaceful and pro-American — was sparked Tuesday after U.S. forces detained the suspected insurgents in raids on their homes. Demonstrators said they were angry that U.S. troops arrested the villagers without consulting local authorities.

More than 1,000 protesters chanting "Die America!" and throwing stones tried to break down a gate at the Bagram (search) base, where thousands of U.S. and other foreign soldiers live behind razor-wire fences and land mines left from Afghanistan's civil war.

U.S. troops fired in the air, as did Afghan soldiers who also used batons to beat back the demonstrators.

There did not appear to be any serious casualties, although an Associated Press reporter was hit and kicked by protesters who accused him of being a spy for the Americans. Other demonstrators punched an AP photographer.

U.S. military spokesman Col. James Yonts confirmed the six were handed over to Afghan authorities after the provincial governor gave a guarantee to present the men for questioning at any time.

Local police chief Abdulrahman Mawlana said the six were transferred to police late Tuesday and spent the night in custody.

However, regional tribal leader Latifullah Rahimi said the men had been allowed to spend the night in their homes and had returned to the police station in the morning.

"The power of the people of Bagram won their release," he told the AP in a telephone interview.

Mawlana said one of the six, who goes by the single name Hamidullah, was a former commander in the U.S.-backed Northern Alliance, which helped oust the Taliban (search) in 2001. Before that, in the 1980s war against Soviet troops, he had been a senior militia leader for Gulbuddin Hekmatyar, a renegade former premier now wanted by the United States.

Another one of the six is an Islamic cleric, while the four others are farmers and laborers, Mawlana said.

Local government chief Kaber Ahmad said the mood in the town adjoining the base was calm Wednesday and there were no protesters. The main outer gate at the base, which had been closed Tuesday, was open and U.S. military convoys were traveling through it.

The riot at Bagram, an hour's drive north of the capital, Kabul (search), came amid a major surge in violence that has killed more than 800 people since March and raised fears that the fighting is a threat to parliamentary elections scheduled for Sept. 18.