FRANCEVILLE, Gabon: Tunisia scored twice in the second half to beat Algeria 2-1 in Franceville Thursday and haul themselves back into contention for an Africa Cup of Nations quarterfinals place.

An Aissa Mandi own-goal broke the deadlock and Naim Sliti converted a penalty as the Tunisians atoned for a 2-0 defeat by Senegal in their opening Group B game.

Substitute Sofiane Hanni scored a consolation goal for the Algerian Desert Foxes a minute into stoppage time.

Among the pre-tournament favorites, Algeria have only one point from two matches and must defeat top-ranked African team Senegal next Monday to have a chance of survival.

Senegal will become the first qualifiers for the quarterfinals if they defeat Zimbabwe later Thursday in the second part of a double-header.

Although the northern neighbors have been regular competitors at the biennial African football showcase, this was only their second Cup of Nations meeting.

The Carthage Eagles — as Tunisia are known, won 1-0 at the group stage in 2013 thanks to a stoppage-time goal from Youssef Msakni, a starter in Franceville.

Tunisia’s Aymen Mathlouthi was much the busier goalkeeper during the opening half in the southeastern Gabonese city.

The vastly experienced shot-stopper used his hands and legs to foil Yacine Brahimi, Islam Slimani, Adlane Guedioura and 2016 African Footballer of the Year Riyad Mahrez.

A free-kick from midfielder Brahimi was millimeters off target before Mathlouthi thwarted striker Slimani by stretching his left leg to push away a header.

Good positioning by the goalkeeper foiled Guedioura when the midfielder unleashed a stinging shot from outside the box.

Mathlouthi then dived swiftly to his right and foiled Mahrez, scorer of both goals in a 2-2 opening-round draw with Zimbabwe four days ago

Tunisia came closest to scoring in the first half when the quick reactions of Algerian goalkeeper Malek Asselah prevented the ball crossing the line.

Having weathered the first-half Algerian storm, Tunisia took the lead five minutes into the second half.

A throw-in and a flick set Msakni free and his intended cross was deflected by Mandi into his own net.

The goal rattled the Desert Foxes and they fell further behind on 66 minutes.

A Faouzi Ghoulam back-header aimed at his goalkeeper was far too weak and he then fouled Wahbi Khazri to concede a penalty.

Sliti calmly scored from the spot, placing the ball in the right corner as Asselah dived the wrong way.

Cameroon rallies

Defender Michael Ngadeu smashed in the winning goal as Cameroon came from behind to beat minnows Guinea-Bissau 2-1 at the Africa Cup of Nations on Wednesday.

Guinea-Bissau had gone in front in the Group A game in Libreville when Piqueti produced a contender for goal of the tournament in the 13th minute.

But the Indomitable Lions, four-time winners of the continental trophy, produced two fine goals of their own to turn things around in the second period at the Stade de l’Amitie.

Sebastien Siani smashed in the equalizer just after the hour mark and Ngadeu emerged as the unlikely hero as he netted the decisive goal with 12 minutes remaining.

After a build-up marred by the refusal of several marquee names to come to Gabon, suddenly Cameroon know a draw against hosts Gabon in their final group game on Sunday will see them progress to the last eight.

Guinea-Bissau had announced their arrival on the continental stage by coming back to hold Gabon in the tournament’s opening game.

But their hopes of getting out of their group are in the balance after this reverse.

They prop up the section, three points behind Cameroon and two behind both Gabon and Burkina Faso, who drew 1-1 earlier in the day.

Guinea-Bissau, nicknamed the ‘Wild Dogs’, caused a sensation as they took the lead thanks to a goal that is bound to be remembered as one of the best of this Cup of Nations, if not the best.

Piqueti, who plays for Sporting Braga’s B team in the Portuguese second tier, lifted the ball over one opponent deep inside his own half and then set off toward goal.

The 23-year-old then outpaced Georges Mandjeck as he charged toward goal before smashing his shot past Fabrice Ondoa from inside the area.

Cameroon were stunned but they could have drawn level just before the interval — the recalled Vincent Aboubakar headed the ball down for skipper Benjamin Moukandjo, whose volley from the edge of the box was saved by Jonas Mendes.

Aboubakar then failed to make a proper connection with a great opportunity inside the area, and it was Guinea-Bissau who almost went further in front early in the second half.

Frederic Mendy robbed Adolphe Teikeu on the edge of the box and then lobbed goalkeeper Ondoa, but Ngadeu got back to clear off the line.

Having survived that scare, Hugo Broos’s side equalized as Moukandjo laid the ball off for midfielder Siani to hammer a first-time effort into the net from 20 yards.

Now with the momentum, Cameroon won it when Christian Bassogog set up Ngadeu, the Slavia Prague defender, to beat Mendes low at his near post.

Today’s matches:

Ivory Coast vs. D R Congo (7:00 p.m. KSA)

Morocco vs. Togo (10: 00 p.m. KSA)