Saifeldin Malik Bakhit scored the only goal of the game as Sudan downed Zambia in an entertaining encounter to reach the African Nations Championship semi finals.
Bakhit spun past John Mwengani and fired a low right-footed shot past Toaster Nsabata in the 32nd minute as Sudan took the lead and ultimately set up a semi final with either Nigeria or Angola.
Sudan will play in the second semi final - in Marrakech on January 31 - after Morocco booked their spot in the final four with a 2-0 victory over Namibia earlier on Saturday.
The Atlas Lions will meet either Congo-Brazzaville or Libya, who go head to head on Sunday.
Zambia played a lot of attractive football during the first half in Marrakech, but for all their pretty build-up, they lacked the penetration to truly trouble the Sudanese.
The absence of a cutting edge cost them just after the half-hour mark when Maaz Abdelraheem Gismalla beat Adrian Chama in the air to play in Bakhit, he rolled Mwangani as the defender lost his footing, and buried the ball past Nsabata.
Bakhit almost turned provider soon afterwards when he set up Maaz, but the latter side-footed into the side netting.
Zambia introduced Friday Samu and Chanda Mushili for Lazarous Kambole and Ernest Mbewe as they sought a way back into the contest, but their best chance fell to Kondwani Mtonga five minutes from time.
The powerful midfielder fired over - with the ball taking a deflection - as the light was extinguished on a Zambian campaign that had initially promised so much.