Raja Casablanca reached the FIFA Club World Cup semi-finals for the first time after defeating CONCACAF Champions League winners CF Monterrey 2-1 after extra time to set up a meeting with Clube Atletico Mineiro.
Buoyed by the raucous home crowd, Raja needed only four minutes to create the game's first significant chance when Issam Erraki shot from distance only for the ball to sail over the bar.
Monterrey's Jesus Zavala answered straightaway with a shot of his own, missing Raja goalkeeper Khalid Askri's post inches wide.
The CONCACAF champions continued attacking Raja's goal when only two minutes later Efrain Juarez narrowly missed with his left-footed strike.
In the 9th minute, Raja captain Mohsine Moutaouali slotted a silky through ball to the onrushing defender Zakaria El Hachimi who could not connect properly in front of Monterrey 'keeper Jonathan Orozco.
Seven minutes later, Club World Cup veteran Cesar Delgado curled a shot from 20 metres out, forcing Askri to make a diving save.
The breakthrough moment of the first half came in the 24th minute when El Hachimi's cross from the right wing proved too tricky for Orozco to handle, and birthday boy Chemseddine Chtibi capitalised to send Agadir Stadium in a frenzy.
Monterrey had the majority of chances near the end of the first half with Delgado and Cardozo leading the efforts calling Askri into action several times.
Monterrey head coach Jose Cruz looked to have found the right words for his team talk at half-time as the Mexicans asserted themselves and looked the brighter side at the start of the second half.
Chile international Humberto Suazo shot wide from the left corner of the box, forcing Askri to save in the 50th minute.
Monterrey levelled the score three minutes later when Suazo delivered a free-kick from the right to the far post where captain Jose Maria Basanta leapt above his marker to head in from six metres out.
The visitors were close to taking the lead in the 60th minute when a long ball found Cardozo left one-on-one with Askri. The Raja 'keeper continued his inspired performance and denied Cardozo from taking the lead.
The remainder of the half saw both sides share possession, but neither team could find decisive breakthroughs.
In the 85th minute, Mouhssine Iajour fought off two defenders inside the penalty box before hitting the side net in the last chance in regulation time.
Spurred on by the near 35,000 crowd in Agadir Stadium, Raja jumped in front just five minutes into the first half of extra time thanks to Ivorian midfielder Kouko Guehi's headed goal from a corner kick.
The only other chance in the first period of extra time came in the 101st minute from Monterrey's Omar Arellano who shot wide from a narrow angle inside the box.
The second half of extra time saw Monterrey claim the majority of chances with substitute Marlon de Jesus forcing Askri into making another fine save.
The fate of the CONCACAF representatives began to sink in with the travelling Monterrey supporters when Suazo's shot in the 118th minute missed the Raja goal by inches.
With Monterrey pushing numbers forward, Raja had a couple of opportunities to double their advantage on the counter, but were unable to capitalise.
Guehi's headed goal proved to be enough as the referee brought the second half of extra time to an end after two minutes of stoppage time.
Raja will meet Atletico Mineiro at Marrakech Stadium in the semi-final on 18 December, while Monterrey will face Al Ahly in the match for fifth place earlier the same day.