Raja Casablanca booked their place in Saturday's FIFA Club World Cup final against Bayern Munich with a 3-1 win over Atletico Mineiro.
Mouhssine Iajour, Mohsine Moutaouali and Vianney Mabide scored the decisive goals for the Moroccan champions on home soil as Casablanca upset their South American opponents with a famous victory on Wednesday.
Ronaldinho had brought the sides level just after the hour with a trademark free-kick, but it was not enough as Moutaouali's late penalty and Mabide's 94th-minute effort sparked wild celebrations.
Casablanca named the same side that beat Monterrey in the quarter-final, while Atletico had Jo and Diego Tardelli in their starting line-up alongside Ronaldinho.
Jo and Ronaldinho both had chances to open the scoring for the visitors in the first half, but lacked accuracy in their finishing and failed to test Khalid Askri in the Casablanca goal.
The hosts struggled to get a foothold in the game and had to settle for rare counter-attacks through Moutaouali and Chem-Eddine Chtibi, although neither were able to produce a clear-cut opportunity.
Casablanca took the lead with a swift break out of defence after soaking up more pressure early in the second half.
Abdelilah Hafidi brought the ball out from the back and played a defence-splitting pass for Iajour to race onto before the striker composed himself and fired low into the bottom corner beyond Victor.
The hosts thought they had a second minutes later when Moutaouali played a ball across the six-yard box, but Hafidi had moved too early and was offside as he tapped into the empty net.
Atletico levelled just after the hour through Ronaldinho as the 33-year-old curled a trademark free-kick over the wall and into the back of the net.
Casablanca then took the lead again with seven minutes to play as Rever brought down Iajour. The defender was adjudged to have tripped the forward as he broke into the penalty area and Moutaouali converted from the spot.
Mabide made sure of the win in stoppage time, the substitute firing home left footed from the edge of the penalty area.
|3||Z. El Hachimi|
|Coach: F. Benzarti|
for C. Chtibi 55'
for A. Hafidi 76'
for M. Iajour 87'
|Kovacic has mixed emotions after Inter draw|
|Serie A Review: Lazio go third despite Inter rally, Sampdoria held|
|La Liga Review: Griezmann the man for Atleti, Villarreal gain fifth straight win|
|Primeira Liga Review: Benfica win six straight|
|Athletic Bilbao 1 Atletico Madrid 4: Griezmann hat-trick seals comeback win|
|Inter 2 Lazio 2: Hosts rally to claim draw|
|McCoist makes Rangers exit|
|Sturridge on course for January return - Rodgers|
|Liverpool getting back on track, says Rodgers|
|Wenger bemoans failure to defend set-pieces|
|Bundesliga Review: Hoffenheim enjoy big win, Freiburg falter late on|
|Zorc: Dortmund to stick with Klopp|
|Liverpool 2 Arsenal 2: Bandaged Skrtel rescues a draw|
|I have no problem with Payet, insists Bielsa|
|Eredivisie Review: Ajax leave it late, Vitesse finally win|
|Pardew rues over-zealous Newcastle approach|
|Benitez hopeful ahead of Supercoppa|
|I nearly took Johnson off - Poyet|
|Johnson revels in derby late show|
|Juventus must maintain focus, warns Allegri|
|Newcastle United 0 Sunderland 1: Johnson settles derby|
|Carlos leaves Sivasspor post|
|Dundee United 2 Celtic 1: Ciftci inspires surprise win|
|Mourinho against use of independent panels|
|Hartlepool not interested in signing Evans|
|Reed delighted with first Southampton start|
|Bremen agree Oztunali loan|
|Irvine backs Ideye to end goal drought|
|Carrick backs Falcao to kick on|
|Dortmund will come back stronger, vows Klopp|
|Bojan senior slams Barcelona|
|Eredvisie title not won yet - Depay|
|Sterling eager to catch Arsenal cold|
|Monk: Ki will be sorely missed|
|Bruce looking to recall Hull duo from loan spells|
|Allardyce: Pearson deserves time|
|Sydney 0 Wellington Phoenix 2: Burns at the double|
|Real Madrid 2 San Lorenzo 0: Spanish giants complete triumphant 2014|
|McCoist: Departures sucking life out of Rangers|
|Hargreaves urges Sterling to stay put|
|Herediano 1 Deportivo Saprissa 1 (agg 3-5): Draw hands visitors consecutive titles|
|Tribulietx basks in Auckland City´s heroics|
|San Lorenzo´s Bauza applauds Ancelotti|
|Wenger: Sanchez a Footballer of the Year candidate|
|Chelsea like United´s treble-winning team - Hargreaves|
|Ancelotti: Copa del Rey victory inspired Real´s stunning run|
|La Liga Review: Catalan clubs triumph|
|Milan on right track - Inzaghi|
|Estoril 1 Vitoria Guimaraes 0: Kleber checks visitors´ momentum|
|Eredivisie Review: PSV in Eagles demolition, AZ downed at home|
|Garcia fumes at missed handball|
|Serie A Review: 10-man Milan frustrate Roma, Cesena rescue point|
|Roma 0 Milan 0: Hosts denied despite Armero red|
|Ligue 1 Review: PSG held at home, Monaco claim fourth win in a row|
|Bundesliga Review: Bremen off bottom with Dortmund win, Augsburg beat Gladbach|
|Blanc frustrated after drab stalemate|
|League Two Review: Moore´s Hartlepool tenure begins with draw|
|Championship Review: Blackpool hit for six, Middlesbrough slip up|
|Luis Enrique enjoying Pedro´s resurgence|
|Scottish Premiership Review: Aberdeen move to second, St Mirren misery continues|
|Koeman delighted with clinical Southampton|
|Pochettino tips in-form Kane for England call-up|
|Dortmund are ´idiots´ - Klopp|
|Allardyce hails ´outstanding´ Downing|
|Young admitted fault after Agbonlahor dismissal, says Lambert|
|Pearson not concerned with speculation|
|Bruce: Hull simply not good enough|
|Everton must improve - Martinez|
|Irvine rues sloppy defending|
|Cruz Azul 1 Auckland City 1 (2-4 on pens): Plucky New Zealanders claim third|
|Austin an example for young strikers - Redknapp|
|Dyche takes pride in White Hart Lane defeat|
|Arabian Gulf League Review: Al Shabab strike late to sink Al Dhafra, top two win|
|Swansea win vindicated changes, says Monk|
|Van Gaal frustrated by dropped points at Villa|
|Paris Saint-Germain 0 Montpellier 0: Champions frustrated by Courbis´ men|
|League One Review: Wilson gains landmark win as Bristol City and Swindon falter|
|Hull City 0 Swansea City 1: Monk´s men celebrate rare away win|
|Southampton 3 Everton 0: Koeman´s side back to winning ways|
|Aston Villa 1 Manchester United 1: Visitors held despite Agbonlahor dismissal|
|QPR 3 West Brom 2: Austin treble lifts hosts out of drop zone|
|Barcelona 5 Cordoba 0: Suarez opens Liga account in emphatic win|
|Tottenham 2 Burnley 1: Lamela stunner wins it for Spurs|
|West Ham 2 Leicester City 0: Carroll, Downing seal the points|
|Werder Bremen 2 Borussia Dortmund 1: Hosts off the bottom by adding to Klopp´s woes|
|Kerala Blasters 0 Atletico de Kolkata 1: Last-gasp Rafique seals inaugural title|
|Warnock fumes over disallowed goal|
|Pellegrini hails Silva quality|
|Betis announce Mel return|
|Huntelaar signs Schalke extension|
|Juventus v Napoli: Allegri backs Tevez to make difference|
|Stoke City v Chelsea: Mourinho calls for adaptability|
|Manchester City 3 Crystal Palace 0: Silva strikes twice as champions go joint-top|
|A-League Review: City snatch Melbourne derby honours, Glory pull further clear|
|Mancini: Inter can finish third|
|Sterling revels in Golden Boy award|
|Pellegrini: You never win a title in December|
|Rodgers bemoans Sanchez snub|
|Ayew confident Marseille can beat title rivals|
|Mercier: San Lorenzo won´t roll over to Real Madrid|
|Lukaku: I´m still 21|
|Mainz bemoan ´tragic´ loss to Bayern|
|Rojo ruled out for Villa trip|
|Lopetegui thrilled with Porto response|