Algeria won the African Cup of Nations, beating Senegal 1-0 in the final with a deflected goal in the opening seconds by striker Baghdad Bounedjah on Friday.

Bounedjah's shot on Algeria's first attack deflected off Senegal defender Salif Sane and looped over goalkeeper Alfred Gomis at Cairo International Stadium.

More Images
Algerian players celebrate after the African Cup of Nations final soccer match between Algeria and Senegal in Cairo International stadium in Cairo, Egypt, Friday, July 19, 2019. (AP PhotoAriel Schalit)

Algeria won the African Cup of Nations, beating Senegal 1-0 in the final with a deflected goal in the opening seconds by striker Baghdad Bounedjah on Friday.

Algerian fans celebrate after the African Cup of Nations final soccer match between Algeria and Senegal in Cairo International stadium in Cairo, Egypt, Friday, July 19, 2019. (AP PhotoAriel Schalit)

Algeria players sprinted the length of the field and jumped over advertising boards to celebrate with their fans at the final whistle. Some players climbed the fences, fists pumping as the raucous Algeria fans surged toward them.

Algerian players throw their coach Djamel Belmadiin the air after the African Cup of Nations final soccer match between Algeria and Senegal in Cairo International stadium in Cairo, Egypt, Friday, July 19, 2019. (AP PhotoAriel Schalit)

Senegal has never won the African Cup and has gone 15 tournaments without a title. Senegal coach Aliou Cisse had another bitter pill to swallow after missing the penalty that cost Senegal the African Cup in a shootout in its only previous appearance in the final in 2002.

Algerian players celebrate after the African Cup of Nations final soccer match between Algeria and Senegal in Cairo International stadium in Cairo, Egypt, Friday, July 19, 2019. (AP PhotoAriel Schalit)

Algeria was a fitting winner in Egypt having won every game, including a 1-0 win over Senegal in the group stage.

Algeria's goalkeeper Adi-Rais Mbolhi celebrates after the African Cup of Nations final soccer match between Algeria and Senegal in Cairo International stadium in Cairo, Egypt, Friday, July 19, 2019. (AP PhotoAriel Schalit)

Algeria had a dream start and Senegal a nightmare when Bounedjah took advantage of open space on the left in the opening moments, swept inside and hit a shot that deflected off Sane, who was returning from injury for the final.

Algerian players celebrate after the African Cup of Nations final soccer match between Algeria and Senegal in Cairo International stadium in Cairo, Egypt, Friday, July 19, 2019. (AP PhotoAriel Schalit)

After pointing calmly to the spot, referee Alioum jogged to the sidelines to check the VAR replays. He overturned the decision and canceled the penalty.

Algerian players pray after the African Cup of Nations final soccer match between Algeria and Senegal in Cairo International stadium in Cairo, Egypt, Friday, July 19, 2019. (AP PhotoAriel Schalit)

Senegal couldn't find the final touch, though, with its worst miss in the second half when Sarr blasted a volley over the crossbar from in front of Algeria's goal.

Algerian players celebrate after a goal during the African Cup of Nations final soccer match between Algeria and Senegal in Cairo International stadium in Cairo, Egypt, Friday, July 19, 2019. (AP PhotoAmr Nabil)

Belmadi, a former Algeria international, took over as coach less than a year ago.

Algeria's Djamel Eddine celebrates a goal during the African Cup of Nations final soccer match between Algeria and Senegal in Cairo International stadium in Cairo, Egypt, Friday, July 19, 2019. (AP PhotoAriel Schalit)

Algeria's Djamel Eddine celebrates a goal during the African Cup of Nations final soccer match between Algeria and Senegal in Cairo International stadium in Cairo, Egypt, Friday, July 19, 2019. (AP PhotoAriel Schalit)

Algeria's Baghdad Bounedjah, left, and Senegal's Salif Sane fight for the ball during the African Cup of Nations final soccer match between Algeria and Senegal in Cairo International stadium in Cairo, Egypt, Friday, July 19, 2019. (AP PhotoHassan Ammar)

Algeria's Baghdad Bounedjah, left, and Senegal's Salif Sane fight for the ball during the African Cup of Nations final soccer match between Algeria and Senegal in Cairo International stadium in Cairo, Egypt, Friday, July 19, 2019. (AP PhotoHassan Ammar)

Senegal's Sadio Mane, left, and Algeria's Aissa Mandi run for the ball during the African Cup of Nations final soccer match between Algeria and Senegal in Cairo International stadium in Cairo, Egypt, Friday, July 19, 2019. (AP PhotoHassan Ammar)

Senegal's Sadio Mane, left, and Algeria's Aissa Mandi run for the ball during the African Cup of Nations final soccer match between Algeria and Senegal in Cairo International stadium in Cairo, Egypt, Friday, July 19, 2019. (AP PhotoHassan Ammar)

Algeria's Amir Bensebaini tackles Senegal's Sadio Mane during the African Cup of Nations final soccer match between Algeria and Senegal in Cairo International stadium in Cairo, Egypt, Friday, July 19, 2019. (AP PhotoAriel Schalit)

Algeria's Amir Bensebaini tackles Senegal's Sadio Mane during the African Cup of Nations final soccer match between Algeria and Senegal in Cairo International stadium in Cairo, Egypt, Friday, July 19, 2019. (AP PhotoAriel Schalit)

Senegal's Mbaye Hamady Niang, left, and Algeria's Djamel Eddine fight for the ball during the African Cup of Nations final soccer match between Algeria and Senegal in Cairo International stadium in Cairo, Egypt, Friday, July 19, 2019. (AP PhotoAriel Schalit)

Senegal's Mbaye Hamady Niang, left, and Algeria's Djamel Eddine fight for the ball during the African Cup of Nations final soccer match between Algeria and Senegal in Cairo International stadium in Cairo, Egypt, Friday, July 19, 2019. (AP PhotoAriel Schalit)

Senegal's Mbaye Hamady Niang jumps for the ball during the African Cup of Nations final soccer match between Algeria and Senegal in Cairo International stadium in Cairo, Egypt, Friday, July 19, 2019. (AP PhotoHassan Ammar)

Senegal's Mbaye Hamady Niang jumps for the ball during the African Cup of Nations final soccer match between Algeria and Senegal in Cairo International stadium in Cairo, Egypt, Friday, July 19, 2019. (AP PhotoHassan Ammar)

Algeria's Baghdad Bounedjah ,right, gestures as Senegal's Ismaila Sarr lays on the pitch during the African Cup of Nations final soccer match between Algeria and Senegal in Cairo International stadium in Cairo, Egypt, Friday, July 19, 2019. (AP PhotoHassan Ammar)

Algeria's Baghdad Bounedjah ,right, gestures as Senegal's Ismaila Sarr lays on the pitch during the African Cup of Nations final soccer match between Algeria and Senegal in Cairo International stadium in Cairo, Egypt, Friday, July 19, 2019. (AP PhotoHassan Ammar)

Fireworks are launched during the closing ceremony before the African Cup of Nations final soccer match between Algeria and Senegal in Cairo International stadium in Cairo, Egypt, Friday, July 19, 2019. (AP PhotoHassan Ammar)

Fireworks are launched during the closing ceremony before the African Cup of Nations final soccer match between Algeria and Senegal in Cairo International stadium in Cairo, Egypt, Friday, July 19, 2019. (AP PhotoHassan Ammar)

Algerian fans cheer before the African Cup of Nations final soccer match between Algeria and Senegal in Cairo International stadium in Cairo, Egypt, Friday, July 19, 2019. (AP PhotoAriel Schalit)

Algerian fans cheer before the African Cup of Nations final soccer match between Algeria and Senegal in Cairo International stadium in Cairo, Egypt, Friday, July 19, 2019. (AP PhotoAriel Schalit)

Senegals fans cheer before the African Cup of Nations final soccer match between Algeria and Senegal in Cairo International stadium in Cairo, Egypt, Friday, July 19, 2019. (AP PhotoHassan Ammar)

Senegals fans cheer before the African Cup of Nations final soccer match between Algeria and Senegal in Cairo International stadium in Cairo, Egypt, Friday, July 19, 2019. (AP PhotoHassan Ammar)

The goal was timed at 79 seconds — the fastest in an African Cup final for at least 39 years — and delivered Algeria just a second African title and first since 1990.

Algerian players celebrate after the African Cup of Nations final soccer match between Algeria and Senegal in Cairo International stadium in Cairo, Egypt, Friday, July 19, 2019. (AP PhotoAriel Schalit)

Algerian players celebrate after the African Cup of Nations final soccer match between Algeria and Senegal in Cairo International stadium in Cairo, Egypt, Friday, July 19, 2019. (AP PhotoAriel Schalit)

Algeria players sprinted the length of the field and jumped over advertising boards to celebrate with their fans at the final whistle. Some players climbed the fences, fists pumping as the raucous Algeria fans surged toward them.

Algeria last made the final 29 years ago, when it won its sole title before Friday.

Senegal and Sadio Mane trudged off the field at the 75,000-seat Cairo International Stadium disappointed again.

Algerian fans celebrate after the African Cup of Nations final soccer match between Algeria and Senegal in Cairo International stadium in Cairo, Egypt, Friday, July 19, 2019. (AP PhotoAriel Schalit)

Algerian fans celebrate after the African Cup of Nations final soccer match between Algeria and Senegal in Cairo International stadium in Cairo, Egypt, Friday, July 19, 2019. (AP PhotoAriel Schalit)

Senegal has never won the African Cup and has gone 15 tournaments without a title. Senegal coach Aliou Cisse had another bitter pill to swallow after missing the penalty that cost Senegal the African Cup in a shootout in its only previous appearance in the final in 2002.

Senegal's desperate disappointment was exacerbated when it was awarded a penalty in the second half and then had it taken away following a Video Assistant Referee review by the referee.

Cameroonian ref Alioum Alioum penalized Algeria's Adlane Guedioura for handball but changed his decision after consulting VAR, which is being used at the African Cup for the first time.

Algerian players throw their coach Djamel Belmadiin the air after the African Cup of Nations final soccer match between Algeria and Senegal in Cairo International stadium in Cairo, Egypt, Friday, July 19, 2019. (AP PhotoAriel Schalit)

Algerian players throw their coach Djamel Belmadiin the air after the African Cup of Nations final soccer match between Algeria and Senegal in Cairo International stadium in Cairo, Egypt, Friday, July 19, 2019. (AP PhotoAriel Schalit)

Algeria was a fitting winner in Egypt having won every game, including a 1-0 win over Senegal in the group stage.

Algeria was captained by Riyad Mahrez, who added an African Cup title to his English Premier League title with Manchester City.

Mahrez had limited first team action with City but he was an integral part of Algeria's victory at the African Cup. His injury-time free kick put Algeria into the final and he ended with three goals, the same number as Mane.

Algerian players celebrate after the African Cup of Nations final soccer match between Algeria and Senegal in Cairo International stadium in Cairo, Egypt, Friday, July 19, 2019. (AP PhotoAriel Schalit)

Algerian players celebrate after the African Cup of Nations final soccer match between Algeria and Senegal in Cairo International stadium in Cairo, Egypt, Friday, July 19, 2019. (AP PhotoAriel Schalit)

Algeria had a dream start and Senegal a nightmare when Bounedjah took advantage of open space on the left in the opening moments, swept inside and hit a shot that deflected off Sane, who was returning from injury for the final.

The ball looped, almost slow motion, over Gomis, who didn't move, apparently certain that it would go over the crossbar.

Senegal was initially given its penalty when Sarr sped down the right wing and sent a cross in that hit Guedioura on the right arm as he held it down next to his body. There didn't appear to be any deliberate move by Guedioura to play the ball and the VAR decision appeared correct.

Algeria's goalkeeper Adi-Rais Mbolhi celebrates after the African Cup of Nations final soccer match between Algeria and Senegal in Cairo International stadium in Cairo, Egypt, Friday, July 19, 2019. (AP PhotoAriel Schalit)

Algeria's goalkeeper Adi-Rais Mbolhi celebrates after the African Cup of Nations final soccer match between Algeria and Senegal in Cairo International stadium in Cairo, Egypt, Friday, July 19, 2019. (AP PhotoAriel Schalit)

After pointing calmly to the spot, referee Alioum jogged to the sidelines to check the VAR replays. He overturned the decision and canceled the penalty.

Making its debut at the African Cup, the VAR was also used in penalty decisions in both semifinals.

Algeria protected its lead for much of the game, allowing Senegal to dominate possession and push forward.

Algerian players celebrate after the African Cup of Nations final soccer match between Algeria and Senegal in Cairo International stadium in Cairo, Egypt, Friday, July 19, 2019. (AP PhotoAriel Schalit)

Algerian players celebrate after the African Cup of Nations final soccer match between Algeria and Senegal in Cairo International stadium in Cairo, Egypt, Friday, July 19, 2019. (AP PhotoAriel Schalit)

Senegal couldn't find the final touch, though, with its worst miss in the second half when Sarr blasted a volley over the crossbar from in front of Algeria's goal.

Algeria's celebrations at the end were boisterous, with thousands of supporters making the trip across to Egypt for the final. They took up almost half of one side of the stadium.

During the celebrations, the Algeria squad and coach Djamel Belmadi kneeled down and prayed as they faced the supporters.

Algerian players pray after the African Cup of Nations final soccer match between Algeria and Senegal in Cairo International stadium in Cairo, Egypt, Friday, July 19, 2019. (AP PhotoAriel Schalit)

Algerian players pray after the African Cup of Nations final soccer match between Algeria and Senegal in Cairo International stadium in Cairo, Egypt, Friday, July 19, 2019. (AP PhotoAriel Schalit)

Belmadi, a former Algeria international, took over as coach less than a year ago.

More AP soccer: https://apnews.com/apf-Soccer and https://twitter.com/AP_Sports

Algerian players celebrate after a goal during the African Cup of Nations final soccer match between Algeria and Senegal in Cairo International stadium in Cairo, Egypt, Friday, July 19, 2019. (AP PhotoAmr Nabil)

Algerian players celebrate after a goal during the African Cup of Nations final soccer match between Algeria and Senegal in Cairo International stadium in Cairo, Egypt, Friday, July 19, 2019. (AP PhotoAmr Nabil)

Algeria's Djamel Eddine celebrates a goal during the African Cup of Nations final soccer match between Algeria and Senegal in Cairo International stadium in Cairo, Egypt, Friday, July 19, 2019. (AP PhotoAriel Schalit)

Algeria's Djamel Eddine celebrates a goal during the African Cup of Nations final soccer match between Algeria and Senegal in Cairo International stadium in Cairo, Egypt, Friday, July 19, 2019. (AP PhotoAriel Schalit)

Algeria's Baghdad Bounedjah, left, and Senegal's Salif Sane fight for the ball during the African Cup of Nations final soccer match between Algeria and Senegal in Cairo International stadium in Cairo, Egypt, Friday, July 19, 2019. (AP PhotoHassan Ammar)

Algeria's Baghdad Bounedjah, left, and Senegal's Salif Sane fight for the ball during the African Cup of Nations final soccer match between Algeria and Senegal in Cairo International stadium in Cairo, Egypt, Friday, July 19, 2019. (AP PhotoHassan Ammar)

Senegal's Sadio Mane, left, and Algeria's Aissa Mandi run for the ball during the African Cup of Nations final soccer match between Algeria and Senegal in Cairo International stadium in Cairo, Egypt, Friday, July 19, 2019. (AP PhotoHassan Ammar)

Senegal's Sadio Mane, left, and Algeria's Aissa Mandi run for the ball during the African Cup of Nations final soccer match between Algeria and Senegal in Cairo International stadium in Cairo, Egypt, Friday, July 19, 2019. (AP PhotoHassan Ammar)

Algeria's Amir Bensebaini tackles Senegal's Sadio Mane during the African Cup of Nations final soccer match between Algeria and Senegal in Cairo International stadium in Cairo, Egypt, Friday, July 19, 2019. (AP PhotoAriel Schalit)

Algeria's Amir Bensebaini tackles Senegal's Sadio Mane during the African Cup of Nations final soccer match between Algeria and Senegal in Cairo International stadium in Cairo, Egypt, Friday, July 19, 2019. (AP PhotoAriel Schalit)

Senegal's Mbaye Hamady Niang, left, and Algeria's Djamel Eddine fight for the ball during the African Cup of Nations final soccer match between Algeria and Senegal in Cairo International stadium in Cairo, Egypt, Friday, July 19, 2019. (AP PhotoAriel Schalit)

Senegal's Mbaye Hamady Niang, left, and Algeria's Djamel Eddine fight for the ball during the African Cup of Nations final soccer match between Algeria and Senegal in Cairo International stadium in Cairo, Egypt, Friday, July 19, 2019. (AP PhotoAriel Schalit)

Senegal's Mbaye Hamady Niang jumps for the ball during the African Cup of Nations final soccer match between Algeria and Senegal in Cairo International stadium in Cairo, Egypt, Friday, July 19, 2019. (AP PhotoHassan Ammar)

Senegal's Mbaye Hamady Niang jumps for the ball during the African Cup of Nations final soccer match between Algeria and Senegal in Cairo International stadium in Cairo, Egypt, Friday, July 19, 2019. (AP PhotoHassan Ammar)

Algeria's Baghdad Bounedjah ,right, gestures as Senegal's Ismaila Sarr lays on the pitch during the African Cup of Nations final soccer match between Algeria and Senegal in Cairo International stadium in Cairo, Egypt, Friday, July 19, 2019. (AP PhotoHassan Ammar)

Algeria's Baghdad Bounedjah ,right, gestures as Senegal's Ismaila Sarr lays on the pitch during the African Cup of Nations final soccer match between Algeria and Senegal in Cairo International stadium in Cairo, Egypt, Friday, July 19, 2019. (AP PhotoHassan Ammar)

Fireworks are launched during the closing ceremony before the African Cup of Nations final soccer match between Algeria and Senegal in Cairo International stadium in Cairo, Egypt, Friday, July 19, 2019. (AP PhotoHassan Ammar)

Fireworks are launched during the closing ceremony before the African Cup of Nations final soccer match between Algeria and Senegal in Cairo International stadium in Cairo, Egypt, Friday, July 19, 2019. (AP PhotoHassan Ammar)

Algerian fans cheer before the African Cup of Nations final soccer match between Algeria and Senegal in Cairo International stadium in Cairo, Egypt, Friday, July 19, 2019. (AP PhotoAriel Schalit)

Algerian fans cheer before the African Cup of Nations final soccer match between Algeria and Senegal in Cairo International stadium in Cairo, Egypt, Friday, July 19, 2019. (AP PhotoAriel Schalit)

Senegals fans cheer before the African Cup of Nations final soccer match between Algeria and Senegal in Cairo International stadium in Cairo, Egypt, Friday, July 19, 2019. (AP PhotoHassan Ammar)

Senegals fans cheer before the African Cup of Nations final soccer match between Algeria and Senegal in Cairo International stadium in Cairo, Egypt, Friday, July 19, 2019. (AP PhotoHassan Ammar)