Tareq Alaows, a refugee who fled military conscription in Syria, is withdrawing his bid to win a seat in Germany's parliament due to security concerns after his candidacy prompted a wave of racist insults, his Greens party said on Tuesday.
Alaows said he was pulling out because of threats to himself and those close to him.
"My candidacy has shown that we need strong structures in all parties, politics and society to confront structural racism and help those affected," he said in a statement.
Alaows said last month he planned to run for the Greens in a former coal-mining region of western Germany in a national election on Sept. 26 - as long as his application for German citizenship is approved by then. The Greens said Alaows would have been the first refugee elected to the federal parliament.
Alaows drifted across the Aegean in a rubber boat before walking most of the way from Athens to Vienna. A lawyer, Alaows taught himself German by putting laws into Google Translate on his mobile phone.
He is one of hundreds of thousands of migrants who entered Germany after Chancellor Angela Merkel opened the borders in 2015 to refugees fleeing war and poverty in the Middle East and beyond.
But that influx has triggered an upsurge in support for the far right, helping to propel the anti-immigration Alternative for Germany (AfD) into the Bundestag parliament in 2017.
Alaows drew a wave of online attacks from the far right, particularly after suggesting that the words "Dem Deutschen Volke" (to the German people) on the parliament building be replaced with "For all people who live in Germany".
"The fact that it is not possible for Tareq Alaows to run for the Bundestag without risking his and his family's safety is highly shameful for our democratic society," Katrin Goering-Eckardt, the Greens' parliamentary leader, wrote on Twitter.
Opinion polls put the left-leaning Greens second behind Merkel's conservative bloc.