African Nations Championship leading scorer Aymen Mahious bagged a brace as Algeria hammered Niger 5-0 in Oran on Tuesday to qualify for a final showdown against Senegal.
While the host nation were ruthless when presented with scoring chances, Senegal were guilty of some incredible misses as they edged Madagascar 1-0 in Algiers in the other semi-final.
Algeria will face Senegal before an expected sell-out 40,000 crowd at the Stade Nelson Mandela in Algiers on Saturday, a day after Madagascar and Niger meet in Oran to decide who finishes third.
Mahious, a 25-year-old forward from Algiers club USM, scored three of the goals that earned Algeria four 1-0 victories en route to the penultimate stage of a tournament known as the CHAN.
After captain Ayoub Abdellaoui nodded the host nation in front on 15 minutes, Mahious struck with a fierce shot, then a powerful header to take his tournament total to five goals.
A nightmare first half for Niger got worse in the final minute when captain Boureima Katkore conceded an own-goal to leave the west Africans four goals behind at the break.
Niger fared better in the second half, partly because Algeria often cruised, but there was still time for a tap-in fifth goal from substitute Sofiane Bayazid.
It was the widest winning margin in a CHAN semi-final, surpassing the 4-0 hiding Morocco gave hosts Cameroon in the last edition two years ago.
Algeria also matched the biggest victory in the 15-year history of a unique national team competition as it is confined to footballers playing for clubs in their country of birth.
Niger were also the victims of the previous 5-0 thrashing -- inflicted by Tunisia during the group phase of the 2016 edition in Rwanda.
Algeria go into the final not having conceded in five matches with goalkeeper Farid Chaal, standing in for the suspended Alexis Guendouz, troubled only during a brief spell of second-half Nigerien pressure.
In Algiers, favourites Senegal wasted little time establishing superiority over surprise semi-finalists Madagascar and went ahead in the fifth minute.
Several Malagasy defenders failed to notice a dash into the box by Pape Diallo and he nodded into the net as goalkeeper Zakanirina Rakotoasimbola mistakenly rushed off his line.
Continually dominant Senegal squandered numerous second-half chances to increase their lead with Cheikh Diouf substituted immediately after missing a 71st-minute sitter.