Ashfa scored in the 88th minute as Egyptians Al Ahly edged Seattle Sounders 1-0 on Saturday to book a Club World Cup semi-final with Real Madrid.
Second-half replacement Ashfa, a 20-time Egypt international, saw his late volley deflected to wrong foot Sounders goalkeeper Stefan Frei, which took Al Ahly to Wednesday's last-four fixture in Rabat.
Earlier, teenager Musab Al Juwayr scored the crucial spot kick as Al Hilal beat CAF Champions League winners Wydad Casablanca 5-3 on penalties (1-1 after extra time) to set-up a semi-final with Brazilians Flamengo.
Al Juwayr, 19, converted after Yahya Attiat-Allah's miss for the Moroccans, playing 350km down the coast from their home city.
Defender Ayoub El Amloud had opened the scoring for the outfit on home soil before team-mate Yahya Jabrane was sent off in stoppage time at the end of the match.
Midfielder Mohamed Kanno equalised for the Saudis and sent the game into extra-time after 94 minutes. Kanno, however, was then red-carded four minutes into the additional half an hour.
Al Juwayr secured his side's place in Tuesday's semi-final in Tangier with an effort from the spot on just his 21st senior appearance.