Nigel Farage has only himself to blame for Ukip's collapse as a political force, the party's former MP Douglas Carswell has said.
Mr Carswell, who quit Ukip before announcing he would stand down as an MP at the June 8 election, said the party's former leader put voters off with "angry outbursts" over immigrants.
His comments came after a disastrous set of local elections for the eurosceptic party, which lost more than 100 councillors and won only a single seat on Thursday.
Leader Paul Nuttall acknowledged the party had lost large numbers of supporters to Conservatives, but insisted it had a "great future" so long as it could "stay on the pitch and hold its ground".
Voters would come back in droves once Theresa May starts to make compromises in Brexit negotiations, he said.
But the near-wipeout prompted millionaire former donor Arron Banks to declare Ukip "finished as an electoral force" under its current leadership.
Mr Carswell and Mr Farage have long been at daggers-drawn, with the former Ukip leader accusing the party's first elected MP of working to undermine it.
Writing in The Mail On Sunday, Mr Carswell said his defection from the Tories and subsequent victory in the 2014 Clacton by-election marked a highpoint for Ukip which was later set back by Mr Farage's outspoken comments.
"Ukip alone offered the chance of change. But we blew it," he said.
"We won almost 60%t of the vote in Clacton by talking about GPs, not just immigration. In Rochester, we won by reaching out beyond our base.
"But rather than learn from that, Nigel Farage reverted to type.
"On the day we triumphed in Clacton, the then Ukip leader majored on migrants with HIV.
"Then he managed to end up in an argument about mothers breastfeeding in public, before making rude noises about Romanians.
"Why? Far from having a strategy, we seemed to be driven by whatever came out of Nigel's mouth."
Mr Carswell claimed David Cameron was keen to debate with Mr Farage on TV because he believed it would ensure the Leave side lost the EU referendum.
The former Clacton MP said: "If Ukip had been in charge of the Leave campaign, I believe David Cameron would still be PM and we would have voted to Remain."