Mohamed Abdelmonem scored the vital goal for the Red Devils to level the return tie at the Mohamed V Stadium, a goal that proved most vital for the record African champions.
Protecting a slender 2-1 first-leg lead, Ahly were caught by surprise early on when Congolese midfielder Fabrice Ngoma headed Raja in front after some slack marking.
Ahly’s Tunisian left-back Ali Maaloul then wasted a penalty before central defender Mohamed Abdel-Moneim put them ahead on aggregate with a timely equaliser on the stroke of halftime, thanks to a corner from Maaloul.
The visitors defended doggedly in the second half, restricting Raja to a few opportunities and silencing a sell-out crowd at the Mohammed V Stadium in Casablanca.
However, Ahly’s ever-reliable keeper Mohamed El-Shennawi came to their rescue at the death, blocking a close-range effort from Mohamed Zrida, who scored Raja’s solitary gal in the first leg.
Watch the highlights
Ten-time winners Ahly qualified for the semis for a record-extending 18th time as they set up a last-four clash with Algeria’s ES Setif, who stunned Esperance with a 1-0 victory in Tunisia earlier in the day following a goalless draw in the first leg.