Labor has fought off a swing to claim victory in the Northern Territory seat of Fannie Bay in the by-election to replace former chief minister Michael Gunner.
Brent Potter was ahead on Saturday night with 52 per cent two-candidate preferred over the Country Liberal Party's Ben Hosking, according to the Northern Territory Electoral Commission, with 63 per cent of the vote counted.
Chief Minister Natasha Fyles hailed Mr Potter's victory, saying the constituents of Fannie Bay "want a government that backs them and only a Territory Labor government can do that".
"It is with great pride that we welcome Brent Potter into the Territory Labor caucus."
Mr Hosking led the primary vote with 42 per cent, with Mr Potter on 33 per cent and the Greens with 19 per cent.
The three independents - George Mamouzellos, Raj Samson Rajwin, and Leah Potter - each garnered between one and three per cent.
Mr Potter is an army veteran and father of four who has most recently worked as a government adviser.
Mr Hosking owns a small business and is a former police officer.
About 5400 people are enrolled to vote in Fannie Bay, with some of those choosing to vote early or cast a postal ballot.
The past three Fannie Bay MPs have served as the NT's chief minister.
The CLP's Marshall Perron first took the seat in 1983 after his previous electorate of Stuart Park was abolished in a redistribution.
He became chief minister in 1988, serving until 1995 when he quit parliament as it began debating voluntary euthanasia laws, something he strongly supported.
Labor's Clare Martin then won the seat in a by-election before becoming opposition leader in 1999 and chief minister when the ALP won office in 2001.
Ms Martin served until 2007 and quit politics at the 2008 election, when Mr Gunner retained the seat for Labor.
After Labor lost office in 2012, Mr Gunner went on to become opposition leader in 2015 and chief minister from 2016, when the party won a convincing majority.
He stepped down in May after leading Labor to another win in 2020 when the party lost four seats.