BAKU, Azerbaijan, Nov. 26 - Dense formations of riot police officers attacked a peaceful opposition demonstration here in the Azeri capital on Saturday, beating and chasing away thousands of unarmed people protesting rigged parliamentary elections earlier this month.

The lopsided violence, much of it against middle-aged men and women, immediately dispersed the rally, which had exceeded its legally permitted time by no more than three minutes.

The demonstrators, supporters of the Azadliq bloc of opposition parties, chanted "Freedom!" and, in a message to President Ilham Aliyev, "Resign!" until the police officers silenced them with clubs.

The officers attacked in tight ranks, clubbing those in their path, and beating and kicking many who fell under the first blows. As people fled, the officers pursued them, flushing them from courtyards with water cannons mounted on trucks, and clubbing, punching and swearing at those they could catch.

At least two women were knocked senseless and left behind by the retreating crowd. The two lay sprawled on the street in a bizarre tableau of lost hats, discarded shoes and dropped flags as police trucks with water cannons rushed past.

The United States Embassy here, which sent diplomats to monitor the rally, denounced the violence and released a statement calling on Azerbaijan to investigate the brutality.

"The United States Embassy strongly condemns the police violence today," the statement said. "We deplore the unjustified and unprovoked use of force against citizens peacefully expressing their right to freedom of assembly."

The British ambassador, Laurie Bristow, who attended the rally, expressed disappointment. "I very much regret that the authorities felt it necessary to disperse the rally by force," he said.

The government of Azerbaijan, a small former Soviet oil state on the Caspian Sea, is trying to strengthen relations with the West while maintaining the corrupt and centralized rule of elite clans. It has cooperated with the United States in counterterrorism efforts and the war in Iraq, and is becoming fabulously rich with oil.

But elections have proved difficult for Mr. Aliyev and his supporters, who make public nods toward democracy but have never held a free election. Mr. Aliyev's father, Heydar, seized power in a coup in the early 1990's, and he himself was elected in a fraud-tainted vote in 2003, months before his father died.

The government now faces a small but vocal opposition that has been emboldened by recent bloodless revolutions in Georgia, Ukraine and Kyrgyzstan. And the country's parliamentary elections, held on Nov. 6, have pushed the repressive streak of the Aliyev government back into the public light.

International monitors declared that the elections failed to meet democratic standards, prompting the opposition to hold rallies seeking to have the results annulled.

Before Saturday, the opposition had demonstrated only within time slots granted by the government, typically for two or three hours. But on Saturday, with a two-hour permit set to expire at 5 p.m., it opted to extend its rally in an act of civil disobedience.

About 4:45 p.m., as about 10,000 demonstrators chanted for a sit-in or for tents, so they could pitch an encampment similar to that used by the Ukrainian opposition during the Orange Revolution in 2004, the speaker at the microphone, Ali Kerimli, leader of the Popular Front Party, told the crowd that if they wanted to sit down past 5 p.m., he would join them.

He said that if they wanted a sit-in, "I will sit with you," but he made it clear that they would not try to hold the square all night. At 5 p.m., the leader of the Liberal Party, Lala Shovkat, called on the police not to use force. It was too late.

Police commanders, who had posted phalanxes of officers in riot gear around the square, could be seen talking on their radios.

At 5:03 p.m., without warning or evident provocation, they attacked. One mass of officers jogged along the edge of the crowd, beating their shields to make an intimidating rumble. They cut off escape from behind the stage and then rushed the opposition leaders, swinging batons at those in their way.

Mr. Kerimli was beaten. The stage was swiftly kicked apart by plainclothes officers.

Simultaneously, formations of riot policemen in the square's center swung into motion, rushing into the thick of the demonstrators, wielding batons. The air filled with shouts and cries and the thumps and whacks of clubs striking jackets and flesh.

The demonstrators had no chance to hold their ground. They gave way and tried to flee. But with the police attacking from multiple directions, many who fled one group of officers were driven toward others and beaten anew. Those who fell were beaten more, and sometimes kicked and punched.

As their ranks collapsed and they were forced down the street, a few of the demonstrators began throwing stones, and several lime-size chunks of concrete could be seen falling short of the advancing police lines.

Oruj Zalov, a deputy interior minister, said 15 to 18 demonstrators were arrested and 21 police officers were injured, including 10 who required hospitalization. He said about 500 officers participated in the action. His information could not be immediately confirmed.

Ms. Shovkat said hundreds of the protesters had been injured, including as many as 300 women. "Let the world community see what kind of regime we are fighting - it's not Ukraine or Georgia, but a government like those in Uzbekistan and Belarus," she said, referring to two of the most repressive post-Soviet states.

She also wondered aloud why the West, which has said it is encouraging democracy in Muslim countries, has not stood more firmly against Mr. Aliyev, whose officers have often used force to disband protests in this secular Shiite state.

"Why is freedom and democracy not a top priority in Azerbaijan?" she said. "Is it because we are not Christian? Or is it because we have oil?"

Mr. Kerimli said the opposition would try to rally again on Dec. 3.

© 2005 New York Times. All rights reserved.