UKIP party members have chosen AM Gareth Bennett as leader of the Assembly group.
Bennett is the assembly member for South Wales Central who joined UKIP in 2014.
He won in the second round with 269 votes and said he was "delighted" to be chosen.
Former Assembly group leader Neil Hamilton got 193 votes. Caroline Jones, who was serving as the current leader, was eliminated after receiving 130 votes in the first round.
The UK leader of the party Gerard Batten congratulated Bennett on winning the vote. He said, "I now expect all elected members in Wales to work together for UKIP‘s cause and to get on with the job".
In June, he told ITV Wales on his plans to stand for the leadership and would campaign for a referendum on whether or not the Assembly should continue.
Health Secretary Vaughan Gething described him as a "deeply offensive man".