Henry Bolton has been elected as the new leader of Ukip in a shock result.
The little-known candidate beat the two front runners in the contest - anti-Islam campaigner Anne Marie Waters and London Assembly member Peter Whittle - to win with 3,874 votes.
He told the party members: "Brexit is our core task, however, it is not the end of the line."
The former Army officer warned earlier this month that Ukip was in danger of becoming the "UK Nazi Party" if it picked the wrong leader to succeed Paul Nuttall, in comments which appeared to be aimed at Ms Waters.
In his victory speech at Ukip conference in Torquay, he called on members to rally around the party.
"Without being united, we cannot lead," he said.
The party has struggled to find its feet since Nigel Farage quit, and its vote share fell to 1.8% at the general election from 12.6% in 2015.
Some 12,915 votes were cast in the leadership election, a 46% turnout.
Mr Whittle, who had been touted as a likely winner, came a surprise fifth with 1,413 - an 11% share of the vote - while Ms Waters came second with 2,755 votes, a 21% vote share.
Up to 18 of the 20 Ukip MEPs had been reportedly preparing to quit the party if Ms Waters had won the leadership battle.