Senegal came from a goal down to beat Guinea 3-2 and reach the semi-finals of the African Cup of Nations.
Senegal striker Mamadou Niang scored against Guinea
Guinea opened the scoring in the 24th minute when Kaba Diawara capitalised on a mistake by the Senegal goalkeeper Tony Sylva.
Pape Bouba Diop scored Senegal's equaliser 16 minutes after the break, heading home a cross from Diomansy Kamara.
Mamadou Niang put Senegal ahead with seven minutes left on the clock when he smashed the ball home, picking up a pass from Henri Camara, who dispossessed Guinea defender Bobo Balde.
Henri Camara scored the Teranga Lions' third from close range in injury time, as Guinea keeper Naby Diarso could only parry a shot from Niang.
Pascal Feindouno grabbed a late consolation for the Syli Nationale with a stunning free-kick from outside the area.
Guinea dominated the opening half hour with Diawara at the centre of the action.
He twice headed wide in a five-minute spell, the second a free header from six metres, and had the ball in the net in the 19th minute, only for the goal to be ruled out for offside.
In the 26th minute, he pounced on Sylva's second mistake in successive games to open the scoring.
Senegal's Lamine Diatta played the ball back from the centre circle but Sylva, whose mistake allowed Nigeria to score on Tuesday, failed to control the ball with his first touch.
His attempted clearance was charged down by Diawara, who walked the ball into the empty net.
Senegal began to find their rhythm just before the break and Kamara burst through the Guinea back line before shooting wide.
Senegal were rewarded with an equaliser in the 62nd minute when Bouba Diop got in front of his marker to head home Kamara's inswinging cross from the edge of the area.
In a tense final half-hour, Senegal midfielder Amdy Faye shaved the post with a rasping 30-metre drive from a free kick and Kamara wasted an excellent chance with a poor final pass after a good move down the right.
Senegal's winner came with seven minutes to go as Camara burst down the left, won a tussle with Balde, and laid the ball into the path of Niang, who fired the ball into the net from 15 metres.
Camara got on the scoresheet in the third minute of injury-time, scrambling the ball in after Niang's first two efforts were blocked.
Feindouno added the final twist but it was too late for Guinea.
There were scuffles between the two sets of players after the final whistle that may well result in repercussions from the Confederation of African Football.
Senegal will now play Egypt in Tuesday's semi-finals.
Senegal coach Abdoulaye Sarr:
"We were well prepared for this game and for the first time we kept our concentration for the entire 90 minutes.
"We have been steadily improving and as I said before the start of the tournament, we will get stronger with each game.
"We didn't concentrate or apply ourselves properly in our last matches but you could see against Nigeria we were on top
for 80 minutes before we gave the game away."
"Passion and concentration was our secret today. We knew Guinea would be tough but we were also aware we could wear them
"They lost their rhythm after we equalised and we were able to go on and win. It was like a real cup game."
Guinea coach Patrice Neveu:
"We met a good Senegalese team who were probably fitter than we were.
"And to their credit, they continued to attack even after we had scored our first goal.
"But at the same time we take exception to some of the calls by the referee. It is not my habit to criticie referees but he was not good enough today.
"He failed to protect my team especially when we attacked."