An extra-time goal from Victor Guzman sent Pachuca into the Club World Cup semi-finals at the expense of Wydad Casablanca.
The 22-year-old's header secured a 1-0 win over the 10-man CAF Champions League holders and set up a last-four meeting with Gremio.
Pachuca, who earned their place at the tournament in the United Arab Emirates thanks to their triumph in this year's CONCACAF Champions League, were the slight favourites heading into the meeting in Abu Dhabi but struggled for fluency in a poor first half.
Keisuke Honda fired a shot wide after the break as the Mexicans began to look the more likely to break the deadlock, although Ismail El Haddad hit the top of the crossbar with a cross that eluded 44-year-old goalkeeper Oscar Perez.
The Moroccan side gave Pachuca the advantage when captain Brahim Nakach was sent off for a second bookable offence, having lunged into a challenge on Achraf Bencharki, but the match remained a fairly-balanced affair as extra-time began.
Honda came close with a free-kick before Guzman dealt the decisive blow in the 112th minute, sending a header high into the net from a fine Jonathan Urretaviscaya cross from the right, thereby setting up a clash with Copa Libertadores champions Gremio.