A former head of the KGB in South Ossetia, Leonid Tibilov, has won the Georgian breakaway region's presidential election.
He polled more than 54% of the vote in a run-off against former human rights commissioner David Sanakoyev.
Mr Tibilov has made it clear he would like to unify the region with North Ossetia, which is in Russia.
But almost all the international community except Russia considers South Ossetia as still part of Georgia.
South Ossetia declared independence in 2008 after fighting in the region led to a brief war between Russia and Georgia. It is supported financially and militarily by Moscow and a Russian governor was given the position of overseeing the region last month.
Our Caucasus correspondent, Damien McGuinness, says the new appointment was seen as a way of boosting Moscow's control while Georgia considered the step as proof that South Ossetia was nothing more than a Russian-backed puppet state.
Russian troops are still stationed in South Ossetia and Georgia has condemned the election as illegitimate and "a farce".
After declaring victory, Mr Tibilov told supporters that "now, we have to build a new and successful legitimate state". He was congratulated by Mr Sanakoyev, who polled 42.65%.
Mr Tibilov promised to work towards the "unification and strengthening of the people" and said he would invite his challenger to join the future government.
The outcome of the vote was in marked contrast to protests that took place in November 2011, after the result was overturned.
Alla Dzhioyeva, a long-time rival of outgoing president Eduard Kokoity, appeared to have won that election after two rounds of voting.
Mr Tibilov was backed by a prominent supporter of Ms Dzhioyeva and had been expected to pick up votes from her supporters.
The head of the South Ossetian KGB from 1992-98, Leonid Tibilov later became first deputy prime minister and then co-chairman of the Georgian-Ossetian peacekeeping commission.