Mesut Ozil has announced his retirement from international football with Germany after accusing the German Football Association of treating him with “racism and disrespect”.

The Arsenal midfielder, 29, won the World Cup with Germany in 2014, but was part of the squad that failed to progress from the group stage at the recently-concluded finals in Russia.

In a lengthy statement posted on Twitter, Ozil – a third-generation Turkish-German who was born in Gelsenkirchen – claimed German FA (DFB) chiefs “wanted him out of the team” before the tournament, due to the emergence of a photograph featuring Ozil and Turkey’s president Recep Tayyip Erdogan.

The picture led to criticism of Ozil in Germany. According to the player, only the intervention of head coach Joachim Low and team manager Oliver Bierhoff ensured he would then take part at the World Cup.

Ozil wrote: “The treatment I have received from the DFB and many others makes me no longer want to wear the German national team shirt. I feel unwanted and think that what I have achieved since my international debut in 2009 has been forgotten.

“People with racially discriminative backgrounds should not be allowed to work in the largest football federation in the world that has many players from dual-heritage families. Attitudes like theirs simply do not reflect the players they supposedly represent.

“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 while I have this feeling of racism and disrespect.

Soccer – FIFA World Cup 2014 – Final – Germany v Argentina – Estadio do MaracanaMesut Ozil became a world champion in 2014 (Mike Egerton/PA)

“I used to wear the German shirt with such pride and excitement, but now I don’t. This decision has been extremely difficult to make because I have always given everything for my team-mates, the coaching staff and the good people of Germany.

“But when high-ranking DFB officials treat me as they did, disrespect my Turkish roots and selfishly turn me into political propaganda, then enough is enough. That is not why I play football, and I will not sit back and do nothing about it. Racism should never, ever be accepted.”

Press Association Sport has contacted the DFB for comment.

Ozil, who has won 92 caps for Germany and helped them win the 2014 World Cup, also revealed he and his family had received hate mail and threatening phone calls and been subjected to social media abuse.

Earlier on Sunday, Ozil insisted he had no regrets over posing for the photograph with Erdogan, a controversial figure who survived an attempted coup in 2016.

But Ozil has insisted there were no political undertones behind the photograph, which also featured his international team-mate Ilkay Gundogan.

Defending his decision, he wrote: “The past couple of weeks have given me time to reflect, and time to think over the events of the last few months. Consequently, I want to share my thoughts and feelings about what has happened.

“Like many people, my ancestry traces back to more than one country. While I grew up in Germany, my family background has its roots firmly based in Turkey. I have two hearts, one German and one Turkish.

“I’m aware that the picture of us caused a huge response in the German media, and while some people may accuse me of lying or being deceitful, the picture we took had no political intentions.

“Although the German media have portrayed something different, the truth is that not meeting with the president would have been disrespecting he roots of my ancestors, who I know would be proud of where I am today. For me, it didn’t matter who was president, it mattered that it was the president.

“My job is a football player and not a politician, and our meeting was not an endorsement of any policies.

“I get that this may be hard to understand, as in most cultures the political leader cannot be thought of as being separate from the person. But in this case it is different.

“Whatever the outcome would’ve been in this previous election, or the election before that, I would have still taken the picture.”