Cameroon booked their ticket for the semi-finals at the 2017 Islamic Solidarity Games after a 3-0 win over Saudi Arabia, while hosts Azerbaijan confirmed their final four place with a 0-0 draw against Morocco.
The Indomitable Lions, who also recorded two draws against Azerbaijan (0-0) and Morocco (1-1), found themselves topping Group A ahead of the home nation while Morocco were eliminated on goal difference.
The Africans face Oman in the semi-finals while Algeria will lock horns with the Azeris.
Cameroon had to cope without head coach Richard Towa, who has returned home after fainting and being taken to hospital during Thursday's game against Morocco.
But his absence didn't seem to faze the Lions, who took the lead when Serge Yvan Ekollo Malolo headed home in the 39th minute. Midfield maestro Frantz Pangop Tchidjui then doubled their advantage from the penalty spot just before half-time.
Captain Franck "Macky" Bagnack Mouegni added a third midway through the second half as Cameroon ran out comfortable 3-0 winners.
In the other Group A game on Monday evening, Azerbaijan recorded a third straight clean sheet as they were held to a goalless draw by Morocco.
The North Africans finished level with Cameroon and Azerbaijan on five points but head home due to their inferior goal difference ahead of Thursday's semi-finals.