The 16 teams were drawn into four groups of four teams. The hosts Morocco were seeded in Group A. The remaining teams were seeded based on their results in the four most recent final tournaments: 2009 (multiplied by 1), 2011 (multiplied by 2), 2014 (multiplied by 3), 2016 (multiplied by 4):