Opposition supporters in Azerbaijan have clashed with riot police, as votes are being counted in a presidential election widely expected to be won by Ilham Aliyev, the son of the current president.
Opposition supporters clashed with riot police in Baku
The police cordoned off a road as they tried to end the protest by 300 demonstrators brandishing sticks.
Exit polls suggest Mr Aliyev has won a large majority.
The opposition has accused the government of rigging the election, and international observers said it may not have been fair.
President Heydar Aliyev, who is standing down after 30 years on and off in power, has eased the way for his son, Ilham Aliyev, to succeed him.
This would be the first transfer of power from father to son in the former Soviet bloc.
Protesters waving sticks and chanting clashed with police outside the headquarters of the opposition Musavat party in Baku.
The protest took place just hours after the polls had closed in a presidential election.
The main opposition candidate, Isa Gambar, has alleged widespread intimidation of voters, including people being threatened with the loss of their jobs, unless they vote for the 80-year-old president's son.
Observers also raised concerns about the run-up to the elections, in which eight candidates are standing.
A spokesman for the New York-based Human Rights Watch showed the BBC a ballot paper that had already been marked for Ilham Aliyev and stamped with an official stamp the day before the poll.
He said hundreds more were likely to have been prepared in the same way.
Correspondents say there has been a tense mood around some polling stations, with some people saying they had been refused registration and others thought to be casting multiple ballots.
The Associated Press reported that one opposition election observer set himself on fire in the south-western Agdam region after election officials had refused to accept a complaint.
Meanwhile, Azerbaijan has accused neighbouring Iran of interference after Tehran broadcast a programme on Tuesday which allegedly supported Mr Gambar. Iranian TV can be seen in parts of southern Azerbaijan.
The ailing president, who has spent the last three months in hospitals abroad, took himself out of the running two weeks ago - but had taken the precaution of enrolling his son as a candidate.
Ilham Aliyev, accompanied by his wife and 18-year-old daughter, went to vote at a school in the capital, Baku.
"I voted for a happy future for Azerbaijan," he told
reporters. "Azerbaijan doesn't need to return to the past
- to war, to chaos... and all the people understand that."
The BBC's Stephen Mulvey says opinion polls are contradictory and the election will not necessarily be a good reflection of the people's will, given the country's record of fraudulent elections.
It also remains to be seen whether Mr Aliyev junior will win in one round, or what would happen if he did.
Mr Gambar said he could not prevent his supporters from taking to the streets.
"I can't ask the people to stand by as their votes are
stolen," Mr Gambar said.
Singer Flora Kerimova, a member of his party, went to vote predicting unrest.
"It will end in blood, and everyone is ready for it," she said.