Mahrez was the author of his country’s first goal late in the first-half.
His trickery down the right flank won him some space ahead of Jamilu Collins and his pass into the penalty area took a deflection before hitting William Troost-Ekong and flying past a stranded Akpeyi.
“The whole team is very happy,” said Mahrez after picking up the man-of-the-match award. “To be in the final of the Africa Cup of Nations is unbelievable. We will do our utmost to win but we will have another huge battle against Senegal."
Djamel Belmadi’s players will go into that clash against the west Africans on 19 July with a slight advantage. The sides met during the group stages and Algeria emerged 1-0 winners.
“We’ve been very good in this tournament,” added Mahrez. “We’ve scored 12 goals and conceded two. We already had confidence but beating Nigeria has given us more. It will be tough in the final but we are capable of winning it.”
Nigeria took four points off Algeria during the qualifiers for the 2018 World Cup. But those matches were before Belmadi’s reign started in August 2018.
They found a way back into their latest showdownwhen referee Bakary Papa Gassama awarded a penalty for handball after consulting the video assistant referee. The Gambian official had initially failed to sanction Aissa Mandi's offence.
Despite Algerian protests and a three minute delay, Odion Ighalo converted the spot kick to score his fourth goal of the tournament.
“Algeria pressed better than us in the first half,” said Nigeria boss Gernot Rohr. “We couldn’t find the wings like we did against South Africa in the quarter-final. Algeria were very organised and we couldn’t find the solutions. The goal against us was unlucky but we never gave up against a very good team.”
Nigeria will play Tunisia in the third place play-off on 17 July at the Al-Salam Stadium in Cairo.
Two days later at the Cairo International Stadium, Algeria will try to lift their second Cup of Nations title against a Senegal team seeking its country’s first crown.
“It will be a close match,” said Rohr of the final. “We played Senegal in a friendly before the tournament and Algeria certainly have the weapons to win it.”