Mohamed Salah buried the decisive penalty as Egypt beat Ivory Coast 5-4 in a shootout to reach the quarterfinals of the African Cup of Nations on Wednesday.

Salah sent his spot kick into the bottom right corner and then ran off and jumped on the back of Egypt substitute goalkeeper Mohamed Abou Gabal. The keeper pulled off the only save of the shootout when he tipped Eric Bailly's penalty onto the crossbar and out.

The game ended 0-0 after 120 minutes.

Ivory Coast's Wilfried Zaha, right, takes on Egypt's Ahmed Hegazi during the African Cup of Nations 2022 round of 16 soccer match between Ivory Coast and Egypt at the Japoma Stadium in Douala, Cameroon, Wednesday, Jan. 26, 2022. (AP PhotoThemba Hadebe)

Ivory Coast's Wilfried Zaha, right, takes on Egypt's Ahmed Hegazi during the African Cup of Nations 2022 round of 16 soccer match between Ivory Coast and Egypt at the Japoma Stadium in Douala, Cameroon, Wednesday, Jan. 26, 2022. (AP PhotoThemba Hadebe)

Egypt set up a North African derby in the quarterfinals against Morocco.

More AP soccer: https://apnews.com/hub/soccer and https://twitter.com/AP_Sports

Egypt's Ahmed Hegazi, left, jumps for the ball with Ivory Coast's Sebastien Haller, during the African Cup of Nations 2022 round of 16 soccer match between Ivory Coast and Egypt at the Japoma Stadium in Douala, Cameroon, Wednesday, Jan. 26, 2022. (AP PhotoThemba Hadebe)

Egypt's Ahmed Hegazi, left, jumps for the ball with Ivory Coast's Sebastien Haller, during the African Cup of Nations 2022 round of 16 soccer match between Ivory Coast and Egypt at the Japoma Stadium in Douala, Cameroon, Wednesday, Jan. 26, 2022. (AP PhotoThemba Hadebe)

Ivory Coast's Max Gradel, left, vies for the ball with Egypt's Mohamed Abdel-Moneim, during the African Cup of Nations 2022 round of 16 soccer match between Ivory Coast and Egypt at the Japoma Stadium in Douala, Cameroon, Wednesday, Jan. 26, 2022. (AP PhotoThemba Hadebe)

Ivory Coast's Max Gradel, left, vies for the ball with Egypt's Mohamed Abdel-Moneim, during the African Cup of Nations 2022 round of 16 soccer match between Ivory Coast and Egypt at the Japoma Stadium in Douala, Cameroon, Wednesday, Jan. 26, 2022. (AP PhotoThemba Hadebe)

Egypt's head coach Carlos Queiroz gives instructions to his players during the African Cup of Nations 2022 round of 16 soccer match between Ivory Coast and Egypt at the Japoma Stadium in Douala, Cameroon, Wednesday, Jan. 26, 2022. (AP PhotoThemba Hadebe)

Egypt's head coach Carlos Queiroz gives instructions to his players during the African Cup of Nations 2022 round of 16 soccer match between Ivory Coast and Egypt at the Japoma Stadium in Douala, Cameroon, Wednesday, Jan. 26, 2022. (AP PhotoThemba Hadebe)