Sadio Mane put an early penalty miss behind him to score the winning spot kick as Senegal won the Africa Cup of Nations for the first time ever following a 4-2 penalty shootout victory.
Mane blew an early chance to fire Senegal into the lead when his seventh-minute penalty was saved by Gabaski, who had taken some advice from Mane's Liverpool team-mate Mohamed Salah before the spot kick.
Both sides had chances, but they couldn't be separated after 120 minutes of football and Mane might have been wondering whether his early penalty miss was going to prove costly.
However, Chelsea goalkeeper Edouard Mendy was the hero for Senegal, saving substitute Mohanad Lasheen's penalty before Mane's redemption was complete.
The Liverpool forward powered the ball past Gabaski and into the bottom corner to spark wild Senegal celebrations as they sealed AFCON glory at the third time of asking after missing out in 2002 and 2019.
Meanwhile, Salah, who was consoled by his Liverpool team-mate Mane, missed out on the chance of leading Egypt to an eighth AFCON title after penalty heartbreak.The Liverpool star was left in tears at the end, having also lost the 2017 final to Cameroon.
Manager Aliou Cisse dedicated the win to the Senegalese population, who have finally seen their national side lift the continent's biggest trophy 57 years after their first AFCON appearance. He said: "We are very happy, we dedicate this victory to the Senegalese people, really to the Senegalese people because since independence until now we are running after this first star. Today, we will also have a star on our shirt."
How Senegal created history...
The final burst into life in the fourth minute when Saliou Ciss was brought down inside the Egypt penalty area by Mohamed Abdelmonem. There was no hesitation from referee Victor Gomes, who pointed to the spot to hand Senegal an early chance of the lead.
What followed seemed like an age as Ciss received treatment after the challenge, but it was time used to good effect by Salah and his goalkeeper Gabaski. Both players were seen talking to Mane, while Salah was spotted giving advice to his goalkeeper regarding his Liverpool team-mate's penalty. Whatever was said worked as Gabaski pushed Mane's powerful spot kick away to safety to keep the game goalless.
Senegal went on to dominate the early stages of the game and Ismaila Sarr twice went close to picking out Mane with low crosses, but the Liverpool forward was just caught on his heels on both occasions.
At the other end, Senegal were doing a good job of limiting Salah's influence, but the Liverpool forward eventually got into the game. A trademark jinking run resulted in a low shot which was easily saved by Edouard Mendy, but just before the break, the Chelsea goalkeeper had to be alert to keep out a Salah shot which was heading for the top corner.
The pattern of the game continued into the second half as Senegal continued to look the more likely of the two sides as both Famara Diedhiou and Mane were denied by Gabaski in quick succession.
However, Egypt, who had to do without suspended coach Carlos Queiroz in the dug-out, eventually grew into the game and Marwan Hamdi flashed a header wide, spurning a glorious opportunity to snatch victory.
As the game grew to a close, chances became few and far between as both sides became nervy. But in the first period of extra-time Gabaski was required by Egypt once again as he palmed Bamba Dieng's powerful drive wide.
Penalty kicks were eventually required and Abdelmonem struck the post before Gabaski kept out Bouna Sarr's effort.
Mendy then denied Lasheen to allow Mane the chance to seal the win and create history for Senegal.
What the players said…
Senegal captain Kalidou Koulibaly: "We feel happy. We knew it would be hard to win the Africa Cup of Nations but today we made it.
"Our team deserved to win this title. We had been looking for this for a long time and now we have it. This team is magnificent.
"It was a tough game and a tough tournament. We made it with our team and our power. Our goalkeeper is the best in the world and we win the title."
Senegal goalkeeper Edouard Mendy: "We are proud. We never won it before. We worked really hard to win this trophy and today we won as a group and as a country and that is why I am super proud.
"The shooters in the penalties did really well, I tried to do my best to save one shot and I did that, so I am super happy!"
What the pundits said…
Former South Africa international Quinton Fortune:
"I was in Senegal a few years ago and I feel emotional because the people there live for football. This is big, this is huge for Senegal. It is unbelievable. For the kids in Senegal, who play football on the streets, this will mean so much because a little kid will dream of Mane scoring the winning penalty now and a star will be born.This is absolutely brilliant for Senegal. The next step is to do well at the World Cup."
Middlesbrough and Ivory Coast defender Sol Bamba:
"Sadio Mane is a top player, and what he did tonight is what top players do. Missing a penalty in a game is never easy and to go on and score the winner in the shootout is unbelievable. To bring the Africa Cup of Nations home will mean a lot to him. He was one of the kids playing in the street, growing up and watching the national team, and now he's bringing he cup home. It's massive for him and for Senegal."
Former Congo international Christopher Samba:
"I think the average age is around 27 so this is a team where most of them will go to the next Africa Cup of Nations and they can build on this success.With the players they have and how they will grow with the respective clubs and country, they will be one of the favourites again."
'Senegal just deserved victory'
Sports Broadcaster Janine Anthony on Sky Sports News:
"It's exactly what African football is about.
"Hope, drama and pain, but in the end what you get is what you deserve, and that's what happened to Senegal.
"They were the better team. They had more possession and created more chances, and they did have more yellow cards and a potential red card, but it showed that hunger. They are the Lions of Teranga for a reason and they had the hunger to do that.
"On the balance of play Senegal just deserved it.
"We've seen Mo Salah disconsolate and shedding tears. He said he wanted to win something important with Egypt, but it is Senegal's night."