Algeria are in danger of crashing out of the Africa Cup of Nations in the group stages after losing 2-1 to Tunisia on Thursday, an own goal from Aissa Mandi and Naim Sliti's penalty the difference as Sofiane Hanni's consolation goal came too late.
Georges Leekens' side were among the pre-tournament favourites, but failed to impress on matchday one as they had to settle for a 2-2 draw with Zimbabwe.
They were looking to make amends in Franceville against a Tunisia side that had lost their opener 2-0 to Senegal and had several chances to open the scoring in the opening 45 minutes, with both Islam Slimani and Riyad Mahrez missing good opportunities.
The Algerians were made to pay for their profligacy early in the second half when Mandi beat his own goalkeeper, before Sliti made it two from the spot to double the advantage.
Hanni pulled one back with a sublime finish late on, but it was not enough to salvage a draw.
The defeat means Algeria need a victory over Senegal in their final group game to have a chance of reaching the knockout stages, while Tunisia are in fine shape to progress, with Zimbabwe awaiting them on Monday.
Algeria made an encouraging start to the game and came close to opening the scoring after just four minutes when Slimani headed straight at Tunisia goalkeeper Aymen Mathlouthi from just yards out after Ramy Bensebaini had cleverly directed a corner from the right into the Leicester striker's path.
Tunisia heavily relied on Wahbi Khazri going forward and the Sunderland winger had a number of dangerous moments in the opening stages, testing shot-stopper Asselah Malik with a free-kick from a narrow angle, then nearly surprising the goalkeeper from a corner, before aiming a shot straight through the middle after a fine individual action.
Mahrez should perhaps have handed Algeria the lead mid-way through the first half after some good work from Leicester team-mate Slimani down the right, only for the gifted attacker to be denied by Mathlouthi as the Tunisia goalkeeper continued to impress in the opening stages of the game.
Henryk Kasperczak's men started to cause Algeria more and more problems as the game progressed and they eventually went a goal up in the 50th minute in somewhat fortunate fashion, captain Mandi beating his own goalkeeper after attempting to block Youssef Msakni's low cross from the left.
Things went from bad to worse for Algeria from there on and the referee had no other choice but to award Tunisia a spot kick after Faouzi Ghoulam brought down Khazri inside the area in an attempt to make up for his own defensive mistake, Sliti coolly placing the ball past Malik from 12 yards out to double his side's lead.
There was some bad news for Tunisia, as they lost the impressive Mathlouthi to injury in the dying minutes of the game, back-up goalkeeper Rami Jridi taking his place.
Algeria refused to give up and eventually pulled one back well into stoppage time when Hanni found the net after some good work from Adlene Guedioura, but it was too late to prevent a damaging loss.