Benatia recently turned out for Fatih Karagumruk in Turkey but has had to call time on his career because of injury.
Born in France to a Moroccan father and an Algerian mother, Benatia chose to represent the Atlas Lions, for whom he won 66 caps, captained at the 2018 FIFA World Cup in Russia and played for at four African Cup of Nations tournaments.
Benatia played for 10 clubs in his career including Bayern Munich, where he won two Bundesliga titles and Juventus, where he won three Serie A trophies.
Accompanying his announcement is a touching post on social media: “From a very young age I had only one dream, to become a professional footballer,” he wrote on Instagram.
“To achieve this, I had to impose a rigour of work, made sacrifices, but above all set myself at each stage of my career new goals.
“Thank God I had the pleasure of becoming a professional footballer but as they say in this job, the hardest thing is not to sign your first contract but to last in time.
“After more than 15 years of "good and loyal service" for football, having played in the most prestigious competitions, I decided to put an end to my career.
“Through my career, I have met great people who have allowed me to build myself, which is why I want to pay tribute to all the clubs I have passed through:
“Olympique Marseille, Lorient, Tours, Clermont, Udinese, Roma, Bayern Munich, Juventus Turin, Duhail and Karagumruk.
“This job also allowed me to defend and represent my country, Morocco, with whom I lived unforgettable moments, the Afcon and especially the 2018 World Cup.
“Finally, I would like to thank all those who have supported me and who have been supporting me all this time, my parents, my wife, my children, my agent, my close friends and you who follow me.
“It is said that the end of one thing is always the beginning of another... So, I say, 'see you soon' with always as a guideline, work and passion. Medhi.”