The people of Nagorno-Karabakh have voted overwhelmingly in favour of a constitution declaring a sovereign state, election officials have said.
The Nagorno-Karabakh issue still divides many in the region
A preliminary count showed more than 98% of those voting in the disputed former Soviet territory backed the declaration, officials announced.
The people are mainly ethnic-Armenian and want independence from Azerbaijan.
Ethnic clashes after the collapse of the USSR led to armed conflict in the 1990s which killed up to 30,000 people.
Officials in Nagorno-Karabakh hope the vote will take the small mountainous region a step closer to becoming an independent state, says the BBC's correspondent in the region, Matthew Collin.
The area, while completely surrounded by the rest of Azerbaijan, has been under ethnic Armenian control since the war.
Nagorno-Karabakh's de facto government is not officially recognised by any country.
The territory's election commission said turnout was more than 80% - more than enough to make the referendum valid.
"According to preliminary results, the constitution is adopted and 10 December from now can be declared as a Constitution Day," election commission chief Sergey Nasibyan told Reuters.
The separatist president of Nagorno-Karabakh, Arkady Gukasyan, said this was a historic chance to establish a democratic state.
But he admitted it did not mean the international community would immediately recognise Nagorno-Karabakh's independence.
The Azeri government insists it must not be allowed to break away.
It said the referendum was illegal, and could damage the peace process.
Azerbaijan has offered Nagorno-Karabakh widespread autonomy as part of a peace deal.
But that has been rejected by the separatist authorities.
The conflicting opinions about the referendum simply demonstrate that even after years of peace talks, a solution to this long-running dispute remains hard to find, our correspondent says.
With many of the one million people displaced by the war still unable to return to their homes, the issue of Nagorno-Karabakh still provokes bitter resentments in the region.