It was amid driving and incessant rain that the teams produced such an open, entertaining and evenly contested encounter, with plenty of goalmouth action throughout. The tone was set as early as the opening minute, when Hamidou Traore's deflected shot looked to be heading for the net until it rebounded to safety off the head of Mali team-mate Lassine Konate.
Senegal improved as the half wore on and had their moments too, with Djigui Diarra twice forced into excellent saves, first from a powerful Roger Gomis shot and then from a looping Sidy Sarr header. However, their cause was dealt a major blow in the closing seconds of the first 45 when Moussa Ba earned a second yellow card for a body-check on Souleymane Diarra.
The Lions of Teranga continued to hold their own, though, and it was no huge surprise when they took the lead 18 minutes into the second half. Sarr, always a danger in the air, played a crucial role in flicking on a long ball, and Ibrahima Wadji reacted quickest, bustling his way into a shooting position and angling a left-foot shot just inside the right-hand post. It wasn't the most powerful of shots but its accuracy was sufficient to beat the goalkeeper, and left everyone awaiting Mali's response.
It didn't take long to arrive. Just ten minutes later, they were level thanks to one of the best set pieces of the tournament. Traore was the man responsible, curling a picture-perfect free-kick up and over the wall and beyond the helpless Ibrahima Sy at the top-right corner.
Mali were in the ascendancy now but missed a glorious chance to move in front soon after when Falaye Sacko failed from the spot, firing in a poor penalty that was easily saved by Sy. The rebound was then headed over by Samassekou.
The Malians would not be denied, though, and Traore again proved the hero with seven minutes remaining. This goal was even better than his first, with the left-footed forward somehow twisting away from three Senegal defenders before cracking an unstoppable 25-yard shot - remarkably, with his weaker foot - just inside the right-hand post.
The drama wasn't yet over, because a second saved penalty - this time at the other end - had the crowd on their feet, with Mali's Djigui Diarra parrying Malick Niang's initial kick and then pushing away the rebound from Mamadou Thiam. And there was still time for some further sheen to be added to the scoreline for the victors, with Samassekou atoning for his early miss with a smart injury-time finish, having been set up by Traore's clever first-time flick.