Abdelhak Benchikha has resigned from his role as Algeria coach following a 4-0 defeat to Morocco.
Mehdi Benatia and Arsenal striker Marouane Chamakh scored during the first half in Marrakech and Youssouf Hadji and Oussama Assaidi added further goals after the interval to complete an unexpectedly one-sided triumph.
It was sweet revenge for Morocco under Belgian coach Eric Gerets after a 1-0 away loss to their North African neighbours in African Cup of Nations qualifying three months ago.
The latest result leaves Algeria with little hope of reaching next year's tournament in Gabon and Equatorial Guinea.
Benchikha, who previously coached clubs in his homeland, Qatar and Tunisia and the Algerian Olympic team, survived just three competitive matches after succeeding veteran Rabah Saadane last October.
Saadane quit after a 1-1 home draw with Tanzania in the opening 2012 Cup of Nations qualifier and Benchikha made a disastrous debut as the Algeria crashed 2-0 away to football lightweights Central African Republic.
The home win over Morocco offered hope that Algeria could mount a serious challenge for Group D honours, but the Marrakech mauling leaves them with a mountain to climb.
Morocco have seven points and Central African Republic, Tanzania and Algeria four each with only the group winners guaranteed a place at the biennial 16-nation African football showcase.