Match ends, Algeria 1, Tunisia 2.
Tunisia boosted their chances of reaching the Africa Cup of Nations quarter-finals with a 2-1 win over neighbours Algeria.
They took the lead when Algeria's Aissa Mandi directed Youssef Msakni's left-wing cross into his own net.
And some dreadful defending by Faouzi Ghoulam led to him bringing down Wahbi Khazri for a penalty which Naim Sliti coolly slotted into the right corner.
Algeria pulled a goal back when Sofiane Hanni struck from the edge of the area.
Tunisia's victory takes them to three points and second place in Group B and leaves Algeria with only one point.
Group leaders Senegal can qualify later on Thursday by beating Zimbabwe.
It means Algeria, who had been one of the pre-tournament favourites, will have to rely on other results going their way if they are to qualify from the group - and they have to face Senegal in their final match.
Tunisia went into the game off the back of a 2-0 defeat to Senegal and anything other than victory against Algeria would have left them in serious trouble.
They were fortunate with their first goal, the ball looping off Mandi's foot to deceive Algerian goalkeeper Malik Asselah, who was playing in place of injured first-choice stopper Rais M'bolhi.
And they were gifted their second when Algeria defender Ghoulam sent an underpowered header back towards his goal and then fouled Khazri who had nipped ahead of him to collect the ball and bear down on goal. Sliti confidently struck home the spot-kick.
Algeria started the match well and Islam Slimani's point-blank header brought an excellent save from Aymen Mathlouthi, while Riyad Mahrez should have done better with a shot from the edge of the area.
Much of Tunisia's best work involved Kazri - starting for the first time at the tournament - and the Sunderland midfielder tested Asselah early on with a free-kick.
Algeria struggled to rouse themselves after going behind and although substitute Hanni took his chance well, sending a curling shot into the corner, their largely toothless display has left them on the verge of an early exit.
Line-ups
Algeria
Formation 4-2-3-1
- 16Malek
- 22MeftahBooked at 31mins
- 2Mandi
- 21Bensebaini
- 3GhoulamBooked at 65mins
- 17GuédiouraBooked at 14minsSubstituted forAbeidat 90+3'minutes
- 10Bentaleb
- 7Mahrez
- 18GhezzalSubstituted forBoundjahat 69'minutes
- 11BrahimiSubstituted forHanniat 74'minutes
- 13Slimani
Substitutes
- 1Rahmani
- 4Cadamuro
- 5Belkaroui
- 6Mesbah
- 8Bennacer
- 9Hanni
- 12Benyahia
- 14Boundjah
- 15Soudani
- 19Abeid
- 20Belkhiter
- 23M'bolhi
Tunisia
Formation 4-4-2
- 16MathlouthiSubstituted forJridiat 88'minutes
- 21Naguez
- 2S Ben Youssef
- 3Abdennour
- 12MaâloulBooked at 45mins
- 10KhazriSubstituted forAli Yacoubiat 73'minutes
- 14Ben Amor
- 13Sassi
- 23Sliti
- 9AkaichiSubstituted forKhenissiat 78'minutes
- 7Msakni
Substitutes
- 1Jridi
- 4Boughattas
- 5Kchouk
- 6Dhaouadi
- 8Lahmar
- 11Khenissi
- 15Azouni
- 17Mathlouthi
- 18Khalil
- 19Khalifa
- 20Ali Yacoubi
- 22Ben Cherifia
- Referee:
- Bernard Camille
Match Stats
- Possession
- Home48%
- Away52%
- Shots
- Home6
- Away12
- Shots on Target
- Home5
- Away4
- Corners
- Home5
- Away4
- Fouls
- Home23
- Away18
Live Text
Post update
Full Time
Second Half ends, Algeria 1, Tunisia 2.
Post update
Offside, Tunisia. Youssef Msakni tries a through ball, but Taha Yassine Khenissi is caught offside.
Post update
Attempt blocked. Mehdi Abeid (Algeria) right footed shot from outside the box is blocked. Assisted by Mohamed Rabie Meftah.
Post update
Offside, Tunisia. Youssef Msakni tries a through ball, but Taha Yassine Khenissi is caught offside.
Substitution
Substitution, Algeria. Mehdi Abeid replaces Adlène Guédioura.
Post update
Ferjani Sassi (Tunisia) wins a free kick on the left wing.
Post update
Foul by Adlène Guédioura (Algeria).
Goal!
Goal! Algeria 1, Tunisia 2. Sofiane Hanni (Algeria) right footed shot from the centre of the box to the centre of the goal. Assisted by Adlène Guédioura.
Post update
Offside, Tunisia. Mohamed Amine Ben Amor tries a through ball, but Ali Maâloul is caught offside.
Post update
Foul by Mohamed Amine Ben Amor (Tunisia).
Post update
Sofiane Hanni (Algeria) wins a free kick in the attacking half.
Substitution
Substitution, Tunisia. Rami Jridi replaces Aymen Mathlouthi because of an injury.
Post update
Foul by Taha Yassine Khenissi (Tunisia).
Post update
Ramy Bensebaini (Algeria) wins a free kick in the defensive half.
Post update
Delay over. They are ready to continue.
Post update
Delay in match Aymen Mathlouthi (Tunisia) because of an injury.
Post update
Corner, Algeria. Conceded by Aymen Abdennour.
Post update
Mohamed Ali Yacoubi (Tunisia) wins a free kick in the defensive half.
Post update
Foul by Islam Slimani (Algeria).