Ivory Coast played with 10-men following Odilon Kossounou’s red card just before the break and fell behind to Nene Dorgeles’ curled 71st-minute finish.
A 90th-minute equaliser from Simon Adingra and the injury-time winner in extra time for Diakite marked the most remarkable comeback in the game, let alone what had gone before in the tournament for the Elephants.
“We have a very good mentality and the coach knows us really well,” Adingra said.
“We are very close to each other. We are ready to keep moving. You know we almost died [exited Afcon] so we have nothing to lose. We can just win.”
For Mali though, the defeat was heartbreaking.
“We have lost the game in the last five minutes, so I am sad for my players,” Eric Chelle, Mali head coach said.
“This is really difficult for us to digest after we managed to put up a great match.”
Mali defender Boubakar Kouyate was aware of what the loss would mean to Eagles fans.
“We really wanted to bring the trophy home and offer it to the population so they could be happy.
“Unfortunately we lost but we did our best. We were not lucky this time, but that’s football.”