A UKIP councillor has been chosen to contest Clacton in the general election for the party after earlier nearly abandoning his bid over a Twitter row.
He then later changed his mind and stayed in the selection race.
The district councillor told the BBC his Twitter feed had been doctored.
Mr Bray won by three votes against London-based barrister Paul Oakley.
Clacton's sitting MP Douglas Carswell had been UKIP's only MP until he quit the party and later announced he would not stand for re-election.