The commander of troops who shot and killed people protesting land seizures in a southern village has been detained, the Chinese government said Sunday, after what could be the deadliest known use of force since the killings around Tiananmen Square in 1989.

The government said three people died in Tuesday's violence in this coastal village northeast of Hong Kong, but witnesses put the death toll as high as 20.

The commander's "wrong actions" were to blame for the deaths, said a statement issued by the government of Guangdong province, where Dongzhou is located. It did not identify the commander or say what his actions were.

Chinese law says a person can be detained for up to three weeks without charges being filed. When someone is arrested, that means authorities have filed formal charges and the case will go to trial.

The government earlier defended the shootings, saying police opened fire after protesters with knives, spears and dynamite attacked a power plant and then turned on authorities.

But the detention of such an official is almost unprecedented for the communist government and suggested Chinese leaders were trying to mollify angry villagers by announcing it. Sunday's statement also said medical teams were sent to Dongzhou to treat the wounded.

The attack was deadliest known clash yet amid rising rural tensions over seizures of land for use in building power plants, shopping malls and other projects. Farmers often complain they are paid too little, and local officials sometimes are accused of stealing compensation money.

The announcement of the detention came as residents gave new details of the violence, saying they heard bursts of gunfire for at least 12 hours after the clash.

On Sunday, at least 100 police with riot shields and helmets stood guard in the village. Police stopped vehicles at roadblocks, looking for local men. There was no violence, but residents could be seen arguing angrily with police.

Police trucks drove through the village blaring promises over loudspeakers that officials would deal with local grievances.

"Have confidence in the government," said the announcement in the local dialect. "This matter will be handled well."

The government said the protests centered on land taken for use in building a power plant using wind turbines, though villagers said the dispute was over a different, coal-fired power plant.

Several residents said they heard gunfire beginning at about 6 p.m. Tuesday. They said there were sporadic bursts of shooting through the night, lasting for about 12 hours.

"We were terrified. We all stayed inside," said a farmer who lives nearby and would give only his surname, Chen. "Even now, we all stay indoors after it gets dark."

A woman who would only give her surname, Luo, said she heard people screaming, "Save me! Save me!"

Villagers contacted Saturday by phone gave death tolls ranging from 10 to 20. If the higher death toll is confirmed, then this would be the deadliest known use of force by authorities since Tiananmen Square, when hundreds, if not thousands, were killed. Villagers said others were missing.

Such incidents have alarmed communist leaders, who are promising to spend more to raise living standards in the poor countryside, home to about 800 million people.

By the government's count, China had more than 70,000 cases of rural unrest last year. Protests are growing more violent, with injuries on both sides.

President Hu Jintao's government has made a priority of spreading prosperity to areas left behind by China's 25-year economic boom. But in many areas, families still live on the equivalent of a few hundred dollars a year.

On Sunday, government banners hung at the entrance of Dongzhou said, "Following the law is the responsibility and obligation of the people," and "Don't listen to rumors, don't let yourself be used."

Another tried to placate local anger, promising, "The people's government will always support the people of Dongzhou."

The official Xinhua News Agency said the province has formed a group to investigate complaints by Dongzhou villagers about land requisition and demands for more compensation.

Local residents said villagers hung up banners earlier appealing to China's central government to investigate the dispute and complaints against local officials.

Witnesses said authorities tore down those banners and burned them Tuesday.

Hong Kong's South China Morning Post newspaper said wounded villagers were "under police control" in hospitals. It quoted a villager as saying relatives were detained after they visited a hospitalized uncle who was shot in the chest.

The Post quoted some residents as saying officials were trying to hide the death toll, offering families money to give up bodies.