Riot police were on duty as protesters gathered in the square
The elections, won by the ruling New Azerbaijan Party, were criticised by international observers.
The government of President Ilham Aliyev allowed the opposition to hold a three-hour rally in the capital, Baku.
Facing accusations of fraud, Mr Aliyev sacked two local officials for allegedly interfering in the elections.
'Serious fraud'
Election officials have ordered re-runs in two districts and one recount.
About 15,000 protesters attended the march and rally, many wearing or waving orange flags in a reference to the success of the "orange revolution" that brought President Victor Yushchenko to power in Ukraine after disputed elections.
The numbers fell far short of the 30,000 to 50,000 the opposition had hoped for.
But leaders said hundreds of other supporters had been stopped from joining the rally.
We are giving the government one chance today to accept a crime was committed in the elections being rigged, and to fix its mistake
Sardar Jalaloglu
Democratic Party
Q&A;: Azerbaijan votes In pictures: Baku protests Democracy takes time - Lavrov
Hundreds of riot police kept a close eye on the protesters but the demonstration ended peacefully.
The BBC's Natalia Antelava, in Baku, said many young people wanted to stay overnight after the rally. But opposition leaders called on people to go home after the permitted three hours was up, to avoid confrontation with the police.
However, they also said that they would continue taking to the streets until the results of this election were annulled.
Sardar Jalaloglu, of the Democratic Party, said the opposition would give the government a chance to correct its mistakes.
"If the people's will is not fulfilled... we will go into the streets with a total demand for [the government's] resignation," he told the crowd.
As well as the two re-runs and one recount, President Aliyev has also promised to punish those responsible for fraud.
Observers from the Organization for Security and Co-operation in Europe, the Council of Europe and the US state department said the elections on Sunday did not meet democratic standards.
They said there was serious fraud in the conduct of the poll - including intimidation, stuffing of ballot boxes and violations in counting procedure.
Thousands of protestors demonstrated today in Baku, the capital of Azerbaijan. They left their houses due to unrest over the results of the November 6 parliamentary elections, which, according to the opposition, are faked. The protest lasted about three hours before being shut down.

The protest gathered some 15,000 people, but the opposition hoped to gather 30,000 to 50,000 Azeris. Many people were stopped by police on their way to the outskirts of Baku. The main demonstration took place at Gelebe Square. When rioters tried to enlarge the protest, police used force to stop them.

Some Azeris believe that a "three hour revolution" wouldn't change anything in the country. They believe that the demonstration was controlled by the government.

The November 6 elections, won, according to officials, by the governing New Azerbaijan Party, have been condemned by international organizations, such as The Organization for Security and Co-operation in Europe, and by independent observers.  The Council of Europe reports that results in about 43% of polling stations were faked.

To prevent protests, re-runs were ordered in two districts by election officials. Also, one recount will take place.