Neil Hamilton has been ousted as UKIP group leader in the Welsh Assembly.
The former Conservative MP has been replaced by Caroline Jones.
It comes after a day of wrangling over the Mid and West Wales AM’s future at the helm of the group, and after reports of a heated meeting of the party’s AMs on Wednesday.
Mr Hamilton became leader of the group after he ousted Nathan Gill following the 2016 assembly election.
Speaking to BBC Wales, Ms Jones confirmed she had won a majority vote of the group, which was taken on Thursday afternoon.
“I’m honoured they’ve put their trust in me to lead them in the Senedd and to bring us forward,” she said.
“Neil has done a good job, a very good job. He’s an accomplished politician. It will be difficult to follow his lead, really.”
The South Wales West AM would not confirm who had voted for her – although it is understood that she has been backed by UKIP colleagues Michelle Brown and David Rowlands.
Ms Jones added: “Neil has worked tremendously hard. Now it’s for someone else to take over and regenerate the party.”
Sources told BBC Wales that a heated meeting of UKIP AMs took place on Wednesday, which Gareth Bennett was said to have left before it ended when it became apparent that a leadership challenge was on the cards.
There were rumours of a breakaway group – backed by Ms Jones, Mr Rowlands and Ms Brown – and it initially appeared that Mr Hamilton’s position as leader of the five-strong group was safe by mid-Thursday afternoon.
But that unravelled after news emerged of a vote which installed Ms Jones as leader.
Analysis by David Deans, BBC Wales political reporter
Neil Hamilton became leader of UKIP in the assembly in dramatic circumstances. He has lost his job in the same.
It is the latest in a series of episodes of infighting in a party that seems unable to build on its past success.
Caroline Jones’ election came after a day of meetings that one source said were occasionally so rowdy voices could be heard down the corridors of the Ty Hywel assembly building.
There have been rumours of unhappiness at a video filmed by Gareth Bennett that attacked Labour AM Joyce Watson, and of concern that the party group direction in general has not been positive.
The question now is what Mr Bennett and Mr Hamilton – who are not thought to have wanted Caroline Jones to take over – do, and whether Mr Hamilton remains the party’s appointed UKIP Wales leader.
Tensions in the group recently emerged after Mr Bennett backed a decision by the assembly’s standards committee on which he sits to recommend Ms Brown be excluded from the assembly for a week over a racial slur she used in a private phone call.
Ms Brown’s spokeswoman had said she was “not likely to take any lessons at all on political correctness, or conduct, from Gareth Bennett”.
Another clash came over Mr Hamilton’s recommendation that Mr Bennett be the group’s representative on UKIP’s national executive committee.
Ms Brown, Ms Jones and Mr Rowlands objected, and outvoted their two colleagues with Ms Brown taking over the role.
UKIP initially won seven seats at the 2016 assembly election but lost two when Mr Gill left the group to sit as an independent while Mark Reckless aligned himself with the Conservatives.