Bebe scored a 40-yard free-kick as Cape Verde beat Mozambique to become the first team to book their last-16 place at the 2023 Africa Cup of Nations.
The Rayo Vallecano forward, once of Manchester United, smashed in a strike which keeper Ernan Siluane should have done better with.
Captain Ryan Mendes took advantage of a defensive mistake to double their lead.
Kevin Pina then hammered a brilliant strike into the top corner from outside the box to seal the win in Abidjan.
Mozambique's best moments came through Geny Catamo. He won a penalty in the first half, which was overturned by the video assistant referee (VAR), hit the crossbar with a free-kick and had one of their two shots on target.
Victory means Cape Verde have guaranteed top spot in Group B, ahead of former champions Egypt and Ghana, with a game to spare.
The Blue Sharks face the North Africans in their final group match on Monday (20:00 GMT) knowing that they will meet a third-placed finisher from Group A, C or D in the last 16 seven days later.