Senegal also reached the semi-finals, defeating Mali 1-0 to do so.
Hosts Morocco defeated Cameroon 2-0 on Friday to advance to the semifinals of the Africa Cup of Nations.
Senegal also reached the semi-finals, beating Mali 1-0.
Brahim Diaz and Ismail Saibari scored for Morocco in the match in Rabat. Morocco has a chance to win the Africa Cup of Nations for the first time since 1976.
Elimon Ndiye scored in Senegal's victory. Algeria and Nigeria and Egypt and Ivory Coast will face each other in the other two quarter-finals on Saturday.
