Azerbaijan's ruling party has won parliamentary elections, according to partial official results.
President Aliyev said the poll was free and fair
With around 90% of votes counted, the New Azerbaijan Party had won 62 of the 125 seats in parliament, the electoral body said.
The main opposition Azadlyq bloc, among those who accuse the authorities of vote-rigging, got five seats.
Observers from the Organisation for Security and Co-operation in Europe are due to give their assessment shortly.
A spokesman for the Central Election Commission said there had been no reports of serious violations.
The commission said about 47% of the voters cast their ballots.
Sunday's elections are seen as an important test for democracy in the oil-rich former Soviet republic.
They are the first since President Ilham Aliyev replaced his father, Heydar Aliyev, in 2003.
Hundreds of international observers are monitoring the poll, and the US government has sponsored one exit poll as a check on the official count.
Washington has a strong interest in stability in the Caspian Sea nation, which sits at a strategically vital point on the Caspian Sea between Iran, Russia and Turkey.
Asked at a news briefing after the polls closed if the ruling New Azerbaijan Party had reached its pre-election target of retaining its 75 seats, Executive Secretary Ali Ahmedov said: "Our information is that, yes, at the very least we have achieved that target."
About 4.5 million voters were registered to choose between more than 1,500 candidates - including President Ilham Aliyev's wife - competing for places in the assembly, or Milli Majlis.
Opposition leaders are planning to launch street protests
The first lady is reported to have won her seat.
Earlier, while casting his ballot, President Aliyev expressed confidence that the election would be free and fair.
"Equal conditions were provided for all the candidates and, in general, the whole election process was smooth and peaceful," he said.
The Azadliq bloc has said it recorded thousands of irregularities, including boxes being stuffed with pro-government ballot papers, multiple voting and intimidation of opposition supporters.
Ali Kerimli, one of the bloc's three main leaders, told the BBC that the opposition would challenge the results in court and would stage street protests.
But another opposition leader expressed hope that the balloting, no matter how imperfect, could lead to change.
"I know that in any case, today is the beginning of a drastic democratic transformation," Musavat Party leader Isa Gambar said after casting his ballot.
The election campaign saw some opposition rallies banned and activists detained.
A number of opposition leaders were arrested just two days before the poll. Most were soon freed, but the campaign manager for the Democratic Party was still in custody after a raid, party officials said.
The opposition was denied permission to rally in a central square in Baku, while the governing party held a demonstration there on Friday.
'No Orange revolution'
The government has said it will act to prevent a Ukraine-style revolution in Azerbaijan.
Azerbaijani officials refused entry to a group of Ukrainian political activists, ordering them to leave the country.
Two months ago, three leaders of an opposition youth movement were jailed, accused of planning an armed revolt.
And at least 12 government officials, including two cabinet ministers, have been sacked and arrested on charges of planning a coup.
The head of the Democratic Party, Rasul Guliyev, was detained in Ukraine last month as he attempted to return from self-imposed exile in the US.