The 2018 African Nations Championship third-placed match came down to penalties, with Sudan beating Libya 4-2 in the shootout after the match had ended in a 1-1 draw.
Waala Musa and Salem Ablo scored in regulation, and the match went to penalties after 90 minutes. Libya, having spent a lot of energy in a furious comeback, missed twice while their opponents were perfect from the spot.
Sunday's final between hosts Morocco and Nigeria will conclude CHAN 2018.
Here's a look at Saturday's teams:
Sudan started the semi-final well, and it took the side just eight minutes to take the lead through Waala.
Libya had no answers for their opponents initially and resorted to physical play, with Ahmed El Trbi running into the first booking. But once the Tuareg found their feet, they started to win the midfield battles and earn looks on goal.
Miftah Taqtaq drew a fine save with an angled drive, and Abushnaf inexplicably missed from just a few yards out, wasting the best chance for a first-half equaliser.
Taqtaq couldn't sort his feet with the goal once again begging, and Libya's star man in the first half went close once more before half-time, watching his shot get pushed out for a corner.
The tournament's official Twitter account shared some half-time stats:
Libya made an early change in the second half, introducing Saleh Taher, but the substitution didn't lead to a major push forward. Where Sudan seemed close to conceding a few times toward the end of the first half, the Falcons were far more comfortable after the break.
Taqtaq was still the main danger man and placed a strike just wide of the post with 20 minutes left to play, while Abushnaf also had another good look, but his strike was saved.
The Tuareg upped the pace again toward the end, searching for a desperate equaliser, and with five minutes left to play, Ablo rewarded their attacking intentions. His free header came courtesy of a defensive blunder, but Libya didn't care one bit.
In the penalty shootout, Elmehdi Mohamed Elhouni missed for Libya, and with the score 4-0, Ablo's final miss handed Sudan the win.
Morocco and Nigeria will meet in the CHAN 2018 final on Sunday.