The controversial Conservative parliamentary candidate for Norwich North stepped down after a series of rows, following discussions with senior figures in the national party.
Nick Rose announced his resignation on Wednesday, less than a month after being selected and three days after the Tories received an official complaint from Thorpe St Andrew School about his appearance at a hustings event there.
Staff said his comments about transgender people and immigration were "inappropriate and incendiary".
He initially defended the remarks as "plain speaking" and said he was determined not to be "drowned out by a woke minority".
But following talks involving senior officials at Conservative Campaign Headquarters, Mr Rose withdrew from the race to succeed MP Chloe Smith.
Sources in the party said the decision followed not just the complaint about the hustings but also a string of other controversies.
One insider said: "It was not just down to this one incident. It was one among a number. It should be seen in context."
The controversies included a post on Twitter/X, which contained a photo of other local Tories, including Ms Smith, in which Mr Rose referred to "idle benefits scroungers".
The post is understood to have infuriated local Conservatives and to have played a role in the end of his candidacy.
Mr Rose later deleted the post and issued an apology saying he was "wrong" to have associated his colleagues with his "personal comments", without retracting the remark itself.
READ MORE: 'Another piece of the jigsaw' in city estate as work FINALLY starts at shop site
In a statement announcing his decision yesterday, he said: “I am today resigning as the Conservative Parliamentary candidate for Norwich North.
"I appreciate the opportunity to have participated in the political process and wish the party success in the upcoming election.”
The statement brought to an end a tumultuous three weeks for the 54-year-old army veteran - who was previously a councillor in Bournemouth.
As well as his social media post about those on benefits, he also faced criticism over his belief that climate change was not "man-made".
What happened at Thorpe St Andrew School?
His comments at the 'Question Time' event which attracted the most controversy from school staff were those in which he endorsed comments made by Suella Braverman, who was sacked as home secretary last week.
In a discussion about transgender issues, he was asked about whether transwomen should be allowed in female prisons and comments made by Suella Braverman, the former home secretary, in which she said: "Transwomen have no place in women’s [hospital] wards or indeed any safe space relating to biological women."
The candidate told the Thorpe audience: "A bloke wearing a dress who identifies as a woman should not be in a woman's prison and should not be allowed in women's toilets.
READ MORE: Plans for 60ft 5G mast approved despite receiving almost 70 objections
"How on earth can all of you ladies here allow a bloke in a skirt into your loos? It's disgusting."
When asked about other remarks made by Ms Braverman - in which she described the arrival of immigrants in small boats across the Channel as an "invasion on our southern coast" - Mr Rose said: "We've got too many illegal migrants coming in. It is an invasion. We are being invaded."
Free speech implications
The school's complaint and Mr Rose's decision to step down have sparked a debate over free speech on transgender issues and immigration.
But sources in the Tory party have suggested his remarks were "clumsy" and "came over in the wrong way".
David Campbell Bannerman, president of the Norwich Conservatives and a former MEP, declined to comment on the specifics of the row, but added: "I strongly believe in free speech and there is a genuine debate around certain social issues and immigration.
"There are challenges though around how best to express those views, not necessarily related to this case but in general."
How did his rivals react?
The local Green Party has been a vocal critic of Mr Rose from the moment he was selected, publicly calling for him to stand down over his views on climate change.
Gary Champion, councillor for Sewell Ward, said: "Norwich North deserves better than having parliamentary candidates parachuted in and our residents expect integrity and leadership from those standing to represent us.
"The realities of climate change should be at the core of political decision-making.
"It is shocking that the Conservatives felt happy to select an individual denying well-backed climate science, and someone with transphobic views in a constituency which has one of the highest populations of trans people in the country.
"I’m pleased to see that Nick Rose now seems to have realised how inappropriate he would be as a representative for our community."
The Labour Party was contacted for comment.
Comments: Our rules
We want our comments to be a lively and valuable part of our community - a place where readers can debate and engage with the most important local issues. The ability to comment on our stories is a privilege, not a right, however, and that privilege may be withdrawn if it is abused or misused.
Please report any comments that break our rules.
Read the rules here