Arsenal midfielder says he has been subject to racism, echoing the views of other European players of foreign descent.

Mesut Ozil’s decision to immediately retire from the German national team has caused shockwaves online after the Arsenal star accused the German Football Association (DFB) of racism and treating him as “a German when we win, and an immigrant when we lose”.

Ozil, who is considered one of the greatest midfielders of his generation, made the announcement on Sunday in a lengthy statement posted on Twitter.

The 29-year-old Muslim footballer said he felt singled out for the failure of the German team to advance beyond the group stage at the 2018 World Cup, because of his Turkish heritage and his meeting with Turkish President Recep Tayyip Erdogan in May.

In the posts, Ozil, a 2014 World Cup winner, further explained how he felt he was perceived by DFB President Reinhard Grindel during victory and during defeat.

“The treatment I have received from the DFB and many others makes me no longer want to wear the German national team shirt,” said Ozil, who made 92 appearances for the national team.

“I feel unwanted and think that what I have achieved since my international debut in 2009 has been forgotten.

“It is with a heavy heart and after much consideration that because of recent events, I will no longer be playing for Germany at international level whilst I have this feeling of racism and disrespect. I used to wear the German shirt with such pride and excitement, but now I don’t … Racism should never, ever be accepted.”

The DFB has yet to comment on Ozil’s claims.

Ozil also cited statements from German politicians, racist taunts from fans and hate mail as examples of the hostile climate he and his family faced leading up to his decision.

But it was comments about being seen as German when the team wins and an immigrant when it loses that circulated widely on social media, after several prominent European players of foreign descent cited the same grievance.

Ozil said he could not accept “German media outlets repeatedly blaming my dual-heritage and a simple picture for a bad World Cup on behalf of an entire squad”.

Romelu Lukaku, Belgium’s leading scorer during the World Cup, wrote in a Player’s Tribune article last month: “When things were going well, I was reading newspapers articles and they were calling me Romelu Lukaku, the Belgian striker. When things weren’t going well, they were calling me Romelu Lukaku, the Belgian striker of Congolese descent”.

France and Real Madrid striker Karim Benzema said in 2011: “If I score, I’m French … if I don’t, I’m an Arab”.

#IStandWithOzil

Thousands took to Twitter to support Ozil and lay scorn at the abuse Muslim and African players are subjected to in Europe, with the hashtag #IStandWithOzil becoming a trending topic worldwide.

Twitter user Joey Ayoub wrote of the unfair and unrealistic expectations placed on migrants – particularly Muslim migrants to prove themselves, citing the case of Mamoudou Gassama after he rescued a toddler hanging from a French balcony.

Gassama’s exceptionalism was celebrated in the French press and due to his bravery he was awarded French citizenship.

Ayoub tweeted: “If only Ozil had saved a baby from a building while simultaneously being one of their best football players.”

If only Ozil had saved a baby from a building while simultaneously being one of their best football players — ibn baldwin (@joeyayoub) July 22, 2018

Ronan Murphy, a journalist at the football website, Goal.com, said Ozil made “the right decision given the way he’s been scapegoated by the DFB”.

Cannot blame Mesut Ozil for retiring from the Germany national team. Absolutely the right decision given the way he’s been scapegoated by the DFB. Hopefully it will lead to some departures there as they take a long, hard look at themselves. #GER #DieMannschaft #AFC — Ronan Murphy (@swearimnotpaul) July 22, 2018

Several prominent German politicians had criticised Ozil and Manchester City’s German international Ilkay Gundogan for meeting with Erdogan, but failed to register loud condemnation of Lothar Matthaus shaking hands and posing for photos with Russian President Vladimir Putin.

Twitter user Shazad Amin said it showed how “structural Islamophobia operates at even the highest level in sport”.

Worth reading this thread to see how structural #islamophobia operates at even the highest level in sport. Lothar Matthaus meets Putin – no big deal. Mesut Ozil meets Erdogan and goes from World Cup winning national German hero to a Turkish immigrant outcast https://t.co/vkrA9MJr7k — Shazad Amin (@DrShazadAmin) July 22, 2018

Jan Aage Fjortoft hailed Ozil for his contributions to the German national side, and sarcastically congratulated those who “bullied” him into his retirement.

Özil has just announced his retirement from the German National Team. Congratulations to all the people who have bullied him in to this decision. Congratulations to those who said he was the reason for a bad German World Cup. Thanx @MesutOzil1088 for a great career for Germany — Jan Aage Fjortoft 🏳️‍🌈 🇳🇴 (@JanAageFjortoft) July 22, 2018

Zito, a writer at SBNation, said it was “stupid” that the “bigots” had won.

“Him being in that team was so irritating to them and their conception of German identity, and now he’s been forced to retire because the environment has become unbearable,” Zito tweeted.

What really makes this so stupid is that the bigots win. They've finally gotten rid of Ozil. Him being in that team was so irritating to them and their conception of German identity, and now he's been forced to retire because the environment has become unbearable. — Zito (@_Zeets) July 22, 2018

A spokeswoman for Chancellor Angela Merkel‘s office described Ozil as a great football player who had done a lot for the national team, before adding that the majority of the roughly three million people with Turkish roots who live in Germany were “well integrated”.

Kick It Out, an organisation focused on battling racism and discrimination in football, said in a statement “immigration has transformed modern life and modern football for the better”, adding that some of Ozil’s comments ring true.

“However, Ozil is right to suggest that for elements of society, ‘when we win I am German, but I am an immigrant when we lose.’ Unfortunately, black players in England, France and beyond have been treated in a similar fashion for a long time,” the statement read.

"Immigration has transformed modern life and modern football for the better." Following comments by @Arsenal midfielder @MesutOzil1088 on the racist treatment he has received by parts of the German media and wider society, we have released a statement: https://t.co/coxzqC8s4j pic.twitter.com/nBEkLNnYm3 — Kick It Out (@kickitout) July 23, 2018

However, others took to Twitter to heavily criticise the player, with Thomas Bareiss, a senior member of Merkel’s Christian Democrats, saying his resignation showed “disrespect” and was “misplaced”.

Meanwhile, Uli Hoeness, the former president of Bayern Munich, revealed his joy, claiming the Arsenal man has been “s*** for years”.

Hoeness, who was sentenced to three and a half years for tax fraud in 2014, told the German newspaper Bild: “Ozil last won a tackle before the 2014 World Cup. And now he and his s***** performance hide beyond this picture”.