Morocco, the 2004 African Nations Cup finalists, bowed out of the 2006 tournament on Saturday after drawing 0-0 with Libya in their final Group A game.
Egypt's 3-1 win over a reshuffled Ivory Coast side who are already in the quarter-finals put the host nation through, while Morocco fell at the first hurdle with just two points.
Morocco's hopes of going through rested on a defeat for Egypt, playing a few kilometres away at Cairo's International Stadium, and a victory over Libya. The Moroccans failed even to do their part against some dogged Libyan defending.