Tunisian players mob goalscorer, Youssef Msakni
Tunisia's Youssef Msakni settled a drab North African derby against Algeria when curling home in stoppage time to earn a crucial win in Rustenburg.
The Carthage Eagles join Cote d’Ivoire, who beat Togo 2-1 earlier, at the top of Group D after a barely-deserved win.
Algeria started the brighter and were unlucky not to lead after 29 minutes when Islam Slimani struck the bar.
Hamdi Harbaoui had seemed to waste Tunisia's best chance only for Msakni to settle affairs with a classy finish, reports the BBC.
Picking up the ball some 30 yards from goal, the winger cut inside on to his right foot before curling a beautiful strike into the top-right hand corner which left Algerian goalkeeper Rais Mbolhi with no chance.
The last time Tunisia were paired in a Nations Cup group with Cote d’Ivoire, they reached the final - as South Africa hosted the competition on its only previous occasion 16 years ago
It was a moment of rare quality to delight the fans inside the Royal Bafokeng Stadium after the previous 90 minutes had been littered with fouls and misplaced passes.
Despite both sides' long history in the competition, the first Africa Cup of Nations meeting between the neighbours proved to be a more nervy affair than the heated encounter some had keenly anticipated.
Tunisia encountered a difficult start to the game as record scorer Issam Jemaa was forced off with a knee problem after coming off worst in a 50-50 challenge with Algerian defender Esseid Belkalem.
As his replacement Harbaoui took time to settle, Algeria took control of the opening period - with Marseille's Foued Kadir wasting a half-chance after 23 minutes.
Three minutes later, the 1990 champions produced their best move of the match as highly-rated Valencia midfielder Sofiane Feghouli swung in a fine left-wing cross, which Slimani headed against the bar with Tunisia keeper Moez Ben Cherifia beaten.