Gambia upset Guinea 1-0 to reach the quarterfinals of the African Cup of Nations on Monday in a game that saw both teams have a player sent off in the final few minutes.

Musa Barrow gave Gambia the lead with a smoothly taken goal in the 71st minute and the tournament debutant held on to extend its surprising run in Cameroon.

More Images
Guinea's Momodou Pa Konate, right, is challenged by Gambia's Dawda Ngum during the African Cup of Nations 2022 round of 16 match between Guinea and Gambia, at the Kouekong Stadium, Bafoussam, Cameroon, Monday, Jan. 24, 2022. (AP PhotoSunday Alamba)

Gambia upset Guinea 1-0 to reach the quarterfinals of the African Cup of Nations on Monday in a game that saw both teams have a player sent off in the final few minutes.

Guinea supporters before the African Cup of Nations 2022 round of 16 match between Guinea and Gambia at Kouekong Stadium, Bafoussam, Cameroon, Monday, Jan. 24, 2022. (AP PhotoSunday Alamba)

Gambia had Yusupha Njie sent off in the 87th minute for elbowing an opponent as they went up for a header, but Egyptian referee Amin Omar also gave Guinea's Ibrahima Conté a second yellow in injury time.

Gambia's Musa Barrow celebrates with teammates after scoring during the African Cup of Nations 2022 round of 16 match between Guinea and Gambia at Kouekong Stadium, Bafoussam, Cameroon, Monday, Jan. 24, 2022. (AP PhotoSunday Alamba)

Gambia's quarterfinal opponent will be either host Cameroon or fellow debutant Comoros. They play later Monday in the last 16 in Yaounde.

Gambia supporters before the African Cup of Nations 2022 round of 16 match between Guinea and Gambia at Kouekong Stadium, Bafoussam, Cameroon, Monday, Jan. 24, 2022. (AP PhotoSunday Alamba)

Gambia supporters before the African Cup of Nations 2022 round of 16 match between Guinea and Gambia at Kouekong Stadium, Bafoussam, Cameroon, Monday, Jan. 24, 2022. (AP PhotoSunday Alamba)

Gambia supporters before the African Cup of Nations 2022 round of 16 match between Guinea and Gambia at Kouekong Stadium, Bafoussam, Cameroon, Monday, Jan. 24, 2022. (AP PhotoSunday Alamba)

Gambia supporters before the African Cup of Nations 2022 round of 16 match between Guinea and Gambia at Kouekong Stadium, Bafoussam, Cameroon, Monday, Jan. 24, 2022. (AP PhotoSunday Alamba)

Gambia wasn't expected to qualify from its group, let alone reach the last eight.

Guinea's Momodou Pa Konate, right, is challenged by Gambia's Dawda Ngum during the African Cup of Nations 2022 round of 16 match between Guinea and Gambia, at the Kouekong Stadium, Bafoussam, Cameroon, Monday, Jan. 24, 2022. (AP PhotoSunday Alamba)

Guinea's Momodou Pa Konate, right, is challenged by Gambia's Dawda Ngum during the African Cup of Nations 2022 round of 16 match between Guinea and Gambia, at the Kouekong Stadium, Bafoussam, Cameroon, Monday, Jan. 24, 2022. (AP PhotoSunday Alamba)

Gambia had Yusupha Njie sent off in the 87th minute for elbowing an opponent as they went up for a header, but Egyptian referee Amin Omar also gave Guinea's Ibrahima Conté a second yellow in injury time.

Guinea was playing without regular captain Naby Keita, who was suspended after picking up two yellow cards in the group stage.

Guinea did have a clear chance to equalize late on when it hit the post, then the crossbar and had a goal-bound shot blocked in quick succession.

Guinea supporters before the African Cup of Nations 2022 round of 16 match between Guinea and Gambia at Kouekong Stadium, Bafoussam, Cameroon, Monday, Jan. 24, 2022. (AP PhotoSunday Alamba)

Guinea supporters before the African Cup of Nations 2022 round of 16 match between Guinea and Gambia at Kouekong Stadium, Bafoussam, Cameroon, Monday, Jan. 24, 2022. (AP PhotoSunday Alamba)

Gambia's quarterfinal opponent will be either host Cameroon or fellow debutant Comoros. They play later Monday in the last 16 in Yaounde.

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

Gambia's Musa Barrow celebrates with teammates after scoring during the African Cup of Nations 2022 round of 16 match between Guinea and Gambia at Kouekong Stadium, Bafoussam, Cameroon, Monday, Jan. 24, 2022. (AP PhotoSunday Alamba)

Gambia's Musa Barrow celebrates with teammates after scoring during the African Cup of Nations 2022 round of 16 match between Guinea and Gambia at Kouekong Stadium, Bafoussam, Cameroon, Monday, Jan. 24, 2022. (AP PhotoSunday Alamba)

Gambia supporters before the African Cup of Nations 2022 round of 16 match between Guinea and Gambia at Kouekong Stadium, Bafoussam, Cameroon, Monday, Jan. 24, 2022. (AP PhotoSunday Alamba)

Gambia supporters before the African Cup of Nations 2022 round of 16 match between Guinea and Gambia at Kouekong Stadium, Bafoussam, Cameroon, Monday, Jan. 24, 2022. (AP PhotoSunday Alamba)

Gambia supporters before the African Cup of Nations 2022 round of 16 match between Guinea and Gambia at Kouekong Stadium, Bafoussam, Cameroon, Monday, Jan. 24, 2022. (AP PhotoSunday Alamba)

Gambia supporters before the African Cup of Nations 2022 round of 16 match between Guinea and Gambia at Kouekong Stadium, Bafoussam, Cameroon, Monday, Jan. 24, 2022. (AP PhotoSunday Alamba)