The Green Party has withdrawn its candidate from the Batley & Spen by-election after it was revealed he made a series of "highly offensive" homophobic tweets as a teenager.
Rugby league international Ross Peltier, 29, had been selected by the party to contest the 1 July vote.
However, his candidacy was revoked after the tweets came to light.
Mr Peltier has apologised for the "terrible" language used and said "in no way" is he homophobic.
The Green Party has said it will not field a replacement.
In a statement released on Twitter at the weekend Mr Peltier, a prop forward for Jamaica and the Doncaster Dons, said the tweets had been posted when he was 19.
"The language used is not acceptable or appropriate in any way, shape or form," he wrote.
"In no way am I homophobic.
"I am sorry if my old tweets have caused harm or upset to anybody."
In a subsequent statement he said he understood the decision to revoke his candidacy, adding that he had "reached out to a number of organisations and want to better my education and give time to work with the LGBTQ+ community".
In response to criticism that his apology was "insincere", he said he was "truly" sorry and that the words used in his past tweets were "terrible and not acceptable".
The Green Party said in a statement: "We were very sorry to learn of Ross Peltier's historic but highly offensive tweets.
"We are clear that people grow and change and should not be limited by youthful mistakes.
"But, as a party that champions the rights of LGBTIQA+ people and their support communities, we do not feel it is right for Ross to be the party's candidate for the Batley and Spen by-election."
The by-election was triggered after Labour MP Tracy Brabin stood down following her election as West Yorkshire's mayor.
The poll will be contested by 16 candidates:
- Paul Bickerdike - Christian Peoples Alliance
- Mike Davies - Alliance For Green Socialism
- Jayda Fransen - Independent
- George Galloway - Workers Party
- Tom Gordon - Liberal Democrats
- Thérèse Hirst - English Democrats
- Howling Laud Hope - The Official Monster Raving Loony Party
- Susan Laird - Heritage Party
- Kim Leadbeater - Labour Party
- Oliver Purser - Social Democratic Party
- Corey Robinson - Yorkshire Party
- Andrew Smith - Rejoin EU
- Ryan Stephenson - Conservative Party
- Jack Thomson - UK Independence Party
- Jonathan Tilt - Freedom Alliance
- Anne Marie Waters - The For Britain Movement