FIFA Club World Cup: Raja Casablanca 2 Monterrey 1
Faouzi Benzarti's men will face Atletico Mineiro in the final four thanks to Kouko Guehi's header after 95 minutes at the Agadir Stadium.
Chemseddine Chtibi had put the Moroccan champions ahead midway through the first half, making no mistake after Monterrey goalkeeper Jonathan Orozco was unable to claim a cross from the right flank.
Jose Maria Basanta leveled the scores 10 minutes into the second half, powerfully heading home a Humberto Suazo set-piece - a goal that proved to be the last of the 90.
However, Guehi got the all-important third goal, crashing in a header from close range to secure his side's progression.
The Mexican side enjoyed the first chance of the game, with Jesus Eduardo Zavala firing over from a tight angle after four minutes, while at the other end Zakaria El Hachimi wasted a golden opportunity to put Raja ahead.
With his side's first sight on goal, the Moroccan defender could only screw a strike horribly wide, under pressure from Ricardo Osorio.
Monterrey gradually seized control, enjoying plenty of possession and threatening through Neri Cardozo, who should have done better with his curled effort from inside the area.
However, against the run of play, Raja took the lead courtesy of Chtibi after 24 minutes.
Orozco failed to deal with the cross from the right and Chtibi was on hand to take advantage and apply a simple finish.
Despite mounting Monterrey pressure, Issam Erraki almost doubled Casablanca's lead with the final chance of the half. After a superb solo run on the break, his cutback dribbled along the line before being cleared.
Monterrey got their equaliser after 55 minutes, courtesy of a well-executed header from captain Basanta before Cardozo was then thwarted by Orozco when one-on-one.
Aside from a late Mouhssine Iajour shot into the side-netting, neither side created further chances, as the game went into extra time.
Raja regained their lead five minutes into the extra period when Guehi powered home captain Mohsine Moutaouali's corner, condemning Monterrey to a fifth-place play-off against Al Ahly on Wednesday.