Nasri began his football career playing for local youth clubs in his hometown of Marseille. He joined professional club Olympique de Marseille aged 9. He spent seven years developing in the club's youth academy at La Commanderie, which is the club's training center. Nasri made his professional debut in the 2004–05 season at the age of 17. In the next season, he became a regular starter in the team. He also took part in European competition for the first time in the 2005–06 UEFA Cup. In the 2006–07 season, Nasri won the National Union of Professional Footballers (UNFP) Young Player of the Year award and was also named in the Team of the Year. He finished his career with Marseille making over 160 appearances. He played in the teams that reached back-to-back Coupe de France finals in 2006 and 2007.