Thousands of people held a peaceful rally here Wednesday to protest parliamentary elections that the United States and European countries said were marred by widespread fraud. The demonstrators dispersed as darkness fell, with no sign of the mass street revolt that some opposition figures had threatened.

President Ilham Aliyev moved to placate his critics. Two regional governors were fired by the presidential administration Wednesday for interfering with the electoral process. Three results were overturned and awarded to the opposition, including the race involving opposition leader Ali Kerimli.

In that contest, local election officials fled with ballots after refusing to sign off on result sheets that showed Kerimli winning easily. A number of other contested votes are being reviewed, officials said.

"Things are moving toward a positive solution," said Elin Suleymanov, a presidential adviser. "The government has reacted to the allegations."

Aliyev's government seems keen to avoid both internal conflict and a breach with the West. The experience of Georgia, Ukraine and Kyrgyzstan, former Soviet republics where rigged elections sparked popular uprisings that brought down governments, appeared to be driving the Azerbaijan government's desire to reach an accommodation.

How many seats the opposition may ultimately secure in the 125-seat parliament remains unclear. But a U.S. Embassy official predicted that in the next couple of days the opposition may capture as many as 20, up from around five on election day.

"That shouldn't be the end of it, and it won't be the end of it," the official said, speaking on condition of anonymity. The "U.S. is going to support" candidates who can present evidence of fraud, the official said. "We are urging the government to take swift decisive action on these claims."

Azerbaijan, a Muslim country rich in energy resources, is located between Russia and Iran. It sent troops to Iraq and has also allowed the United States to place radar installations in its territory. Defense Secretary Donald H. Rumsfeld has visited several times, raising speculation that the Pentagon wants a larger military presence here.

Under the orange banners adopted from the revolt that toppled the government in Ukraine, a crowd variously estimated at 10,000 to 15,000 marched to a square outside the city center Wednesday. There, the protesters listened to speeches by opposition leaders, whose message included calls on President Bush to keep his vow not to abandon democracy for strategic interests.

The United States sacrificed "freedom in the vain pursuit of stability," Bush said last May in a speech in Latvia, referring to U.S. acquiescence to Soviet domination of Eastern Europe after World War II.

"I turn my face to the president of the United States, George Bush," said Sardar Jalaloglu, deputy chairman of the Azerbaijan Democratic Party. "The people of Azerbaijan want freedom. You should keep your promise."

Wednesday's march was sanctioned by the government. Several hundred riot police who have previously clashed with opposition supporters stood in formation at the foot of the crowd without incident. Police videotaped the gathering from at least three buildings around the square.

The demonstration suggested that the opposition is not sufficiently strong and organized to hold the streets against a government that has frequently used force to disperse crowds. Before Wednesday's rally, opposition leaders had said that 30,000 to 50,000 people would march.

Aliyev's ruling party is planning its own rally at the same location Thursday. Opposition leaders said they had applied for permission to assemble again on Saturday.