Springboks chasing full 80-minute performance against Wales
But while the bronze medals the Sudanese won in 2011 as hosts were expected, those they collected in the central Moroccan city came as a surprise.
Few neutrals expected Sudan to go beyond the group stage of the competition restricted to home-based footballers with Morocco and Guinea favoured to advance from Group A.
However, the east Africans came second behind the hosts on goal difference, upset Zambia in the quarter-finals and fell by a solitary goal in a tight semi-final duel with Nigeria.
The fighting spirit of a squad coached by recently appointed Croatian Zdravko Logarusic was evident again against Libya as Sudan recovered from conceding a late goal to win the shootout.
They converted all four penalties while Libyans Elmehdi Elhouni and Salem Ablo were foiled by saves from Sudan goalkeeper Akram Elhadi.
Ablo missing condemned Libya to a first CHAN shootout loss after three spot-kick successes won them the 2014 title and they pipped Congo Brazzaville on penalties in a quarter-final last weekend.
Walaaeldin Musa nodded Sudan into an eighth-minute lead and an Ablo header on 84 minutes after Elhadi failed to cut off a deep cross brought the teams level.
Morocco host Nigeria Sunday in an eagerly anticipated final at the 65,000-capacity Stade Mohammed V in Casablanca with a record $1.25 million (about one million euros) first prize at stake.
Download our app and read this and other great stories on the move. Available for Android and iOS.