Still alive - Ivory Coast's roller-coaster AFCON ride goes on
The Ivorians won Monday's last-16 tie 5-4 on penalties after a 1-1 draw in capital Yamoussoukro, with Franck Kessie scoring the decisive spot-kick.
The victory led to wild celebrations in Abidjan, the country's economic capital, where fans danced in the streets and set off fireworks.
"Ivorians don't mess around, we won," one supporter, Lydie Tagro, told AFP amid bedlam on the streets of Ivory Coast's largest city.
Yet the team was in a mess just a week ago, seemingly set for a group-stage exit from their own tournament.
Now they are into the quarter-finals and eyeing a third continental title after seeing off one of the favourites to lift the trophy.
Interim coach Emerse Fae had described it as a "resurrection" even before their meeting with Senegal, for which the Ivorian squad prepared by visiting Yamoussoukro's Notre Dame de la Paix, the world's largest basilica.
The last week has been a roller-coaster ride for his team and for supporters in this football-mad West African country.
A 4-0 defeat by Equatorial Guinea last Monday, January 22, their heaviest-ever home loss, meant they finished third in their group.
Yet they squeezed through with the worst record of the four best third-placed sides to qualify, rescued because their neighbours Ghana somehow conceded two goals in stoppage time to draw 2-2 with Mozambique.
Before their qualification for the last 16 was confirmed, the Ivorian Football Federation decided to dismiss veteran French coach Jean-Louis Gasset.
Fae, the former Elephants midfielder who played alongside Didier Drogba and the Toure brothers in the side that lost the 2006 AFCON final, was put in interim charge.
Yet that was only by default after a sensational bid to bring back former boss Herve Renard -– the coach of the France women's side -– was rejected by his current employers.
Haller boost
Many Ivorians thought their team stood no chance against the might of Sadio Mane's Senegal, but they showed the mental strength that had been lacking in the group stage as they recovered from the loss of an early goal to fight back.
Kessie, the former AC Milan and Barcelona midfielder now playing for Al Ahli in Saudi Arabia, was one of those dropped from the team by Fae but he ended up as the hero.
It was Kessie who equalised with a late penalty in normal time before then scoring the winning kick in the shoot-out.
"It was such a long shot for us to get here that we are not going to get carried away," insisted Fae, who described his players as "warriors".
Ivory Coast now carry on to the last eight this weekend with renewed belief. Crucially, two of their most important attacking players are fit again.
Simon Adingra, the Brighton and Hove Albion winger who played no part in the first two matches of the tournament with a muscle injury, has since appeared twice from the bench.
Most notably, Sebastien Haller made his first appearance of the competition after injury as a second-half substitute against Senegal.
The 29-year-old Borussia Dortmund forward is omnipresent around Abidjan, his face appearing on billboards across the city advertising anything from bottled water to deodorant, a mobile phone operator and more.
Conspicuous by his absence from the field of play during the group stage, he converted a penalty in the shoot-out against Senegal and the hope among Ivorians must now be that he can start the quarter-final.
"We are feeling a lot of emotion," Haller told broadcaster Canal Plus Afrique at the end of Monday's game.
"The last few days have not been easy but we had to believe in ourselves."