Thousands of demonstrators chanting "Freedom!" and some carrying portraits of President Bush marched across Azerbaijan's capital Saturday, demanding the resignation of the government and free parliamentary elections in the biggest protest in years.

The rally of about 20,000, the second protest in as many weeks, was organized by Azadlig, which means freedom, a bloc formed by three leading opposition parties to run in parliamentary elections set for November.

About 200 policemen in full riot gear stood guard around a central square where protesters gathered. Brief clashes erupted, but no serious injuries were reported. Last month, police beat back and detained dozens of protesters who tried to hold a banned rally in Baku.

Tensions have been building in this oil-rich country in advance of the elections. Some observers have predicted that Azerbaijan could experience an uprising similar to those that toppled unpopular governments in three other former Soviet countries -- Georgia, Ukraine and Kyrgyzstan -- in the past 19 months.

The opposition has demanded election law reforms and access to state-controlled television. It has also accused authorities of rigging the October 2003 presidential election, in which President Ilham Aliyev succeeded his late father, Heydar Aliyev, and has demanded changes to prevent fraud in the parliamentary vote.

Azerbaijan, a mostly Muslim country of 7.9 million, is the starting point of a key pipeline that U.S. officials say will reduce dependence on oil from the Middle East. The country is also a U.S. ally in its war on terrorism and has provided troops in Iraq.