Mohamed Salah got back among the goals for Egypt on Saturday as the record seven-time champions beat Guinea-Bissau after Nigeria secured their place in the last 16 of the Africa Cup of Nations.
Salah shows up for Egypt, Nigeria through to Cup of Nations last 16
Nigeria are through to the last 16 after dismissing Sudan in Garoua
Salah's first-time finish at the back post in the 69th minute in Garoua got his and Egypt's campaign in Cameroon up and running after they had lost 1-0 to Nigeria in their opening Group D game.
However, Guinea-Bissau were left fuming after a stunning 82nd-minute strike by Mama Balde was ruled out following a VAR review.
Carlos Queiroz's Egypt, who also hit the woodwork three times, now need only draw their last group game against neighbours Sudan in Yaounde on Wednesday to guarantee safe passage to the last 16.
"It was a really tough game and we were a little bit lucky with the foul," Salah admitted to broadcasters.
"We have to win our next game now to make sure we qualify and we will do our best to go as far as we can in the tournament."
Salah, who had not scored in any of his previous six appearances for Egypt this season, struck the post with just 84 seconds played and Mostafa Mohamed hit the same upright later in the first half.
The Liverpool star finally broke the deadlock midway through the second half when he met Amr El Solia's floated ball to the back post with a first-time cushioned volley that beat Guinea-Bissau goalkeeper Jonas Mendes.
Substitute Zizo also hit the woodwork for Egypt before Balde's superb strike into the far corner was ruled out by the referee on review for grappling defender Omar Kamal to the ground.
The small west African nation of Guinea-Bissau are appearing at their third straight AFCON having never qualified before 2017, but they are left still searching for their first win at the tournament after eight attempts.
In contrast, continental powerhouse Nigeria secured qualification for the knockout phase thanks to a 3-1 win over Sudan earlier at the same venue in northern Cameroon.
With former Super Eagles star Augustine Eguavoen in temporary charge after last month's sacking of German coach Gernot Rohr, Nigeria stuck with the same line-up that defeated Egypt.
Villarreal's Samuel Chukwueze struck in the third minute and the three-time winners scored a second goal in slightly fortunate circumstances on the stroke of half-time.
Captain William Troost-Ekong's header ricocheted off a Sudan defender and then the head of Taiwo Awoniyi and squirmed in under the goalkeeper.
Moses Simon added a third right at the start of the second half, with Walieldin Khidir converting a consolation spot-kick for Sudan.
The Super Eagles are now certain to top Group D meaning they will stay in Garoua -- close to the border with the Nigerian state of Adamawa -- for a last-16 tie against a third-placed side on January 23.
"To be a champion you should be ready to play against any team, so any team that comes our way, we'll be prepared," said Eguavoen.
The matches in Garoua, home of leading Cameroonian club Cotonsport, attracted larger crowds than have been seen at most Cup of Nations matches, with the requirement to be fully vaccinated against Covid-19 and provide a negative test appearing to put many fans off attending in the football-mad country.
On Sunday reigning champions Algeria look for their first win when they play Equatorial Guinea in Douala after the Ivory Coast face Sierra Leone in the same Group E.
A Tunisia side missing a raft of players due to positive coronavirus tests take on Mauritania in the coastal town of Limbe after Gambia face Mali at the same venue.
Ghana striker Benjamin Tetteh has been handed a three-game ban after punching an opponent during a mass brawl at the end of Friday's 1-1 draw with Gabon.
Tetteh took a swing at Gabon's Aaron Boupendza and was later shown a red card by the referee.
The ban means he will not be able to play again at the tournament unless Ghana reach the semi-finals.