Moroccan champions Raja Casablanca earned a second dramatic win at the Fifa Club World Cup by scoring in extra time to beat Monterrey of Mexico 2-1 in Agadir to reach the semi-finals.
The host nation's representatives will now play Copa Libertadores winners, Atletico Mineiro in the last four.
Ivorian midfielder Kouko Guehi scored with a winning header from a corner kick five minutes into the first added period to thrill the host nation's fans, after the first 90 minutes had ended 1-1.
The deadlock in the match was broken midway through the first half when Raja took the lead in the 24th minute thanks to a goal from Chemseddine Chtibi. Monterrey pulled level through defender Jose Basanta's header in the 53rd minute.
Raja also left it late in their preliminary match of the Club World Cup on Wednesday. The Moroccans needed a stoppage-time goal to get past Auckland City 2-1.
The other semi-final pits the Asian champions Guangzhou of China against the European champions, Bayern Munich. Guangzhou knocked out the African champions Al-Ahly.
Formerly known as the Intercontinental Cup, the Club World Cup is being played in Africa for the first time.