The rally's organizers intended to demand amendments to Azerbaijan's election laws to prevent the authorities falsifying the election outcome, the creation of an independent public broadcaster, and the prosecution of the killer of independent journalist Elmar Guseinov, who was shot dead outside his apartment in early March.
Opposition sources claimed today that protesters put up no resistance to police and said they would organize more rallies in the coming months.
The rally was scheduled to take place between 4 p.m. and 6 p.m. local time at the 28 May metro station.
Groups of a few dozen demonstrators managed to assemble in at least two places, some of them chanting "Free elections!"
Initial reports suggested that police detained between 30 and 100 people, including 10 women. Authorities later told RFE/RL's Azerbaijani Service that they had detained 45 people.
Mehman Javadoglu of the opposition Musavat Party told RFE/RL that 15 activists from the opposition bloc Bizim Azerbaijan (Our Azerbaijan), which also helped organize the demonstration, were among those detained. He claimed that many were beaten up by the police, although that could not be independently confirmed.
City police chief Yashar Aliyev, speaking at an afternoon news conference, said some 500 people had tried to demonstrate. Two policemen were wounded, Aliyev said. The police chief denied that force was used against demonstrators.
Police also earlier stormed the headquarters in Baku of the progressive wing of the Azerbaijan Popular Front Party (AHCP) -- one of the co-organizers of the planned rally -- and battered party Deputy Chairman Hasan Karimov.
The rally was called by the Ugur bloc of three prominent opposition parties, which comprises the AHCP progressive wing, the Musavat party, and the Democratic Party of Azerbaijan. The bloc was formed earlier this year to participate in the parliamentary elections due in November.
The event was the first mass action to be held in Azerbaijan since violent clashes between police and opposition supporters following the disputed presidential election in October 2003.
The opposition has applied on several occasions since then for permission to hold a mass rally, but authorities have always refused.
Baku municipal officials earlier this week rejected the organizers' request for permission to hold today's rally, arguing that it was inexpedient to hold such a mass action on the eve of the arrival in Baku of several foreign heads of state who will attend the official inauguration on 25 May of the Baku-Tbilisi-Ceyhan export pipeline for Caspian oil.
City Mayor Hajibala Abutalibov summoned the rally's organizers on 20 May and tried to persuade them to call off the gathering, promising that all restrictions on holding rallies and demonstrations would be lifted after the election campaign got under way on 15 June. But the organizers rejected his request, stressing their constitutionally guaranteed right to organize such gatherings. Abutalibov then warned them that if they nonetheless tried to hold the rally, the authorities would resort to all necessary measures to prevent it.
Since 18 May, police have rounded up several dozen known opposition activists, including Razi Nurullaev, head of the youth organization Yokh! (No!), and Ruslan Bashirli, head of the youth organization Yeni Fikir.
Following today's incidents, the U.S. Embassy in Baku accused authorities of abusing Azerbaijani citizens' right to free association, and it called on the Azerbaijani government to respect its citizens' constitutional rights. The embassy said it will continue to monitor the situation in the country.
The U.S. Embassy had issued a statement the day before the planned rally expressing concern at the opposition arrests and at the municipal authorities' refusal to grant permission for the event. The statement pointed out, as did a similar statement issued on 19 May by the OSCE office in Baku, that Azerbaijani President Ilham Aliyev issued a decree last week on measures to ensure that the November parliamentary ballot is free, fair, and democratic. That decree specifically instructed city officials across Azerbaijan to permit public rallies.
Ali Kerimli, chairman of the AHCP progressive wing, told the website day.az that "today's events show that the authorities are not ready to hold democratic elections but want to usurp power again." He said the demonstrators offered no resistance to police, and that the opposition plans to hold further such rallies. The next is scheduled for 4 June.