Algeria was eliminated from the African Cup of Nations in Gabon in a goal rush in the final games in Group B Monday. The one-time title contender drew with Senegal 2-2 and learned Tunisia went through to the quarterfinals in its place by beating Zimbabwe 4-2. Algeria's George Leekens became the first coaching casualty of the African Nations Cup, resigning Tuesday after his team was eliminated less than three months after taking the job. "Given the pressure exerted on the federation and the national team, I prefer to stop my contract. For the good of all, I prefer to leave even if I do it with a sore heart while wishing all the success in the world to the national team," said a statement on the Algerian Football Federation website. Ten goals flew in at the culmination of the group but Algeria's fate was effectively sealed quickly when North African rival Tunisia went 2-0 up very early over the Zimbabweans with strikes from Niam Sliti and Youssef Msakni. Algeria needed Tunisia to lose in Libreville to have a chance of progressing to the quarters. Senegal had already qualified for the quarterfinals - and already won the group - and rested many of its frontline players. Algeria still couldn't win. In the eastern city of Franceville, Algeria twice led through goals from Islam Slimani, and Senegal twice equalized, leaving Algeria to exit the tournament without a win. Two of the four quarterfinal lineups have now been decided: Tunisia will play Burkina Faso, and Senegal will play Cameroon. Algeria's surprise exit - it was tipped to go far - followed host Gabon's elimination Sunday. A real big name could follow the same route Tuesday when defending champion Ivory Coast's hopes hang on it getting a win against Morocco. The fate of Ivory Coast and Group C will be decided in two of the more out-of-the-way locations to have ever hosted African Cup games. Ivory Coast faces Morocco in Oyem in northern Gabon. Congo, the group leader, plays Togo in Port-Gentil, Gabon's main seaport and the center of its oil industry. Ivory Coast must find a way to outsmart its former coach, with Herve Renard the man who led the Ivorians to the African title two years ago. It boils down to this: Ivory Coast needs to beat Morocco in Oyem and hope that Togo doesn't beat Congo in Port-Gentil. A draw would be enough for Morocco to knock the defending champion out in the group stage. There was all-out action from the moment the Group B games kicked off on Monday. Senegal made a forceful start and spurned early chances against Algeria, and Slimani made them pay when he volleyed a cross from the left from Sofiane Hanni into the roof of the net in the 10th minute. Slimani immediately scooped up the ball and ran it back to the center circle to show that Algeria meant business. But in the other game, Tunisia led Zimbabwe 2-0 inside 22 minutes, and was 3-1 up before even a second goal was scored in the Algeria-Senegal match. Tunisia scored all of its four goals in the first half at Libreville's Stade de l'Amitie. Sliti, Msakni, Taha Yessine Khenissi, and a Wahbi Khazri penalty made sure Tunisia didn't miss out on its chance to make the quarterfinals alongside Senegal. Senegal twice hit back against Algeria to maintain its unbeaten run in the group stage, although it was the first time in this tournament the Senegalese hadn't won. Midfielder Papa Diop equalized the first time just before halftime when he punched in a shot from outside the area. Slimani again pushed Algeria ahead on 52 minutes after being set up by clubmate Riyad Mahrez. Moussa Sow hit back for Senegal two minutes later for 2-2.