The Liberal Democrat candidate for Thurrock in Essex has stood down after being accused of posting racist and homophobic tweets 10 years ago.
Screenshots purporting to show Kevin McNamara social media comments have been circulating, prompting his resignation.
Mr McNamara said he was “deeply sorry for the comments that I made”.
A Liberal Democrat spokesperson said: “A disciplinary process has been instigated.”
The tweets are said to have been posted in 2009 and 2010 and allegedly include racist and homophobic language.
Mr McNamara, who came fourth in Thurrock in the 2017 election, said: “These words are deeply offensive and I apologise profusely to everybody that I have offended with these tweets.
“I would never want to undermine the voices of those communities with slurs or degradation and it’s important that people who want to represent the public are held to the very highest standard.
“I am resigning as a candidate with immediate effect for the upcoming election. I apologise to all of those I have let down with my past conduct and will work hard to regain their trust.”
Mr McNamara is as an honorary vice-president of the Liberal Democrat Campaign for Race Equality and came fifth in the election for the Essex police and crime commissioner in 2016.