Mohamed Salah scored as Egypt won 3-2 to dump defending champions Ivory Coast out of the Africa Cup of Nations in a thrilling quarter-final on Saturday.
Omar Marmoush and Ramy Rabia netted for Egypt, then Ahmed Aboul-Fetouh conceded an own goal before half-time.
Salah then edged closer to a first Africa Cup of Nations winners medal by doubling the lead soon after the break before Guela Doue pulled a goal back for Ivory Coast, but it wasn't enough for the holders.
The jubilant Egyptians will face Senegal on Wednesday in Tangiers with the winners meeting hosts Morocco or Nigeria four days later in the final.
"I'm so happy with this win and reaching the semi-finals," said Salah.
"I am proud to wear the Egyptian national jersey and all the players know the responsibility that comes with it."
Egypt coach Hossam Hassan thanked his players, calling them "true Egyptians who fight for the happiness of their people".
He added: "The success belongs to the players, starting with Salah and Marmoush, who lead the press from the front. We know there will be spaces, and our players can exploit them."
The triumph in Agadir confirmed Egypt's AFCON dominance over Ivory Coast since they first met 56 years ago. The Pharaohs have won 11 times and the Elephants just once.
Ivory Coast become the eighth consecutive title-holders to fail to successfully defend the title since Egypt achieved the feat in 2010.
Salah has helped Liverpool win the Premier League, FA Cup, League Cup, Champions League and Club World Cup, in its previous format, but the most prized African medal has eluded him.
The 33-year-old has twice been a runner-up after losses in the AFCON final to Cameroon in 2017 and Senegal five years later.
Now he is two matches away from realising his long-time dream of helping Egypt win the AFCON a record-extending eighth time.
Salah arrived in Morocco amid uncertainty over his future at Liverpool after a post-match outburst following a draw at Leeds when he was demoted to the substitutes' bench.
But he has been back to his predatory best at the AFCON, scoring the winning goals against Zimbabwe and South Africa in the group stage, then the goal that sealed a last-16 victory over Benin.
On Saturday, Egypt took the lead just 182 seconds after the kick-off through Manchester City striker Marmoush.
Ivory Coast lost possession, Emam Ashour delivered a superb pass and Marmoush took advantage of Odilon Kossounou slipping to beat goalkeeper Yahia Fofana.
Egypt increased their lead on 32 minutes when centre-back Rabia soared above Ibrahim Sangare to meet a Salah corner, and his looping header beat Fofana.
The defending champions were rattled and needed to score. It came after 40 minutes when Egyptian Aboul-Fetouh conceded an own goal.
Yan Diomande, the 19-year-old RB Leipzig striker, floated a free kick into the heart of the six-yard box, Kossounou nodded the ball goalwards and it entered the net off the midriff of Aboul-Fetouh.
Salah restored Egypt's two-goal lead just seven minutes into the second half, and once again Ashour from African club giants Al Ahly was the creator.
The midfielder gained possession on the left wing, and his low cross was perfectly weighted for Salah to push the ball into the net despite being under pressure from Ghislain Konan.
Ivory Coast, who overcame a two-goal deficit to beat Gabon in a group match, once again halved the deficit after 73 minutes.
Egypt failed to clear a corner and Doue flicked the ball past 37-year-old goalkeeper Mohamed El Shenawy to set up a tense finish.