Raja Casablanca survived a scare to defeat Auckland City 2-1 and qualify for the quarter-finals of FIFA's Club World Cup on Wednesday.
The Moroccan outfit - playing in their home country - were heavy favourites and dominated the first half at Stade d'Agadir.
They took a deserved lead in the 39th minute when Mouhssine Iajour atoned for an earlier miss with a stylish left-foot finish.
Fijian Roy Krishna shocked Casablanca by pouncing on a horrendous defensive error to level just after the hour mark, but Abdelilah Hafidi spared the blushes of the hosts with a close-range finish in the 92nd minute.
Casablanca will now play North American champions Monterrey of Mexico in the last eight.
Casablanca - the only side involved in the tournament who are not champions of their continent - entered the match on the back of a four-match winless run domestically.
They were buoyed by a partisan home crowd against amateur outfit Auckland City – winners of the OFC Champions League – and started brightly, with Adil Karrouchy volleying an excellent cross from captain Mohsine Moutaouali over in the seventh minute.
Iajour was sent through on goal in the 22nd minute but had his effort saved by the outstretched leg of Auckland goalkeeper Tamati Williams.
He made amends six minutes before half-time though, as a Karrouchy ball played him in.
Iajour beat Auckland skipper Ivan Vicelich before shooting past Williams from a tight angle.
Casablanca nearly had a second three minutes into the second half, with another excellent Karrouchy ball headed behind by John Irving, but dropped back after that and allowed Auckland into the match.
Christopher Bale shot wide before a smart Issam Erraki intervention kept out Krishna from a clever free-kick.
Auckland did level proceedings in the 63rd minute, as a dreadful defensive mix-up – which saw three players fail to clear and Mohamed Oulhaj and Karrouchy tackle each other – allowed Krishna in.
The forward kept his composure to slot past the onrushing Khalid Askri from outside the penalty area and his goal spurred Auckland on.
They started to have more of the ball and Krishna proved a continued threat, but a late Casablanca attack ended Auckland's hopes of reaching the quarter-finals.
The influential Karrouchy supplied the cross and, although Oulhaj's header was well saved by Williams, Hafidi was on hand to send the home crowd into raptures.
|3||Z. El Hachimi|
|Coach: F. Benzarti|
for C. Chtibi 74'
for M. Iajour 85'
for A. Hafidi 90+4'
|Simeone marvels at Griezmann impact|
|Djordjevic to have x-ray on ankle problem|
|Eredivisie Review: PSV go seven points clear, Heerenveen cruise|
|Luis Enrique backs himself on Suarez omission|
|Lazio 3 Milan 1: Parolo and Klose seal victory|
|Cameroon 1 Guinea 1: Draw ensures Group D stays finely poised|
|Rodgers reveals Sturridge fitness boost after Bolton stalemate|
|Atletico Madrid 3 Rayo Vallecano 1: Griezmann inspires routine win|
|Gabriel move agreed, Campbell to join Villarreal on loan|
|Gabon v Equatorial Guinea: Neighbours face off for quarter-final berth|
|FA Cup Review: Chelsea stunned by Bradford as Middlesbrough beat Manchester City|
|Ronaldo apologises for red card|
|Pulis eyes room for improvement|
|Liverpool 0 Bolton Wanderers 0: Championship side frustrate Anfield to earn replay|
|Karanka hails players after stunning City|
|Elche 0 Barcelona 6: Neymar and Messi inspire resounding win|
|League Two Review: Wycombe and Burton held, Shrewsbury up to second|
|Pardew lauds Palace performance|
|Pochettino laments late collapse|
|Scottish Premiership Review: Celtic stretch lead, Inverness and Dundee United keep up chase|
|Parkinson revels in huge upset after humbling Chelsea|
|Bayern targeting unbeaten Bundesliga season - Robben|
|Pearson: FA Cup win can breed confidence|
|League One Review: Dons close gap, Peterborough end run|
|Ivory Coast 1 Mali 1: Gradel rescues Renard´s men|
|Fulham seal Richards loan|
|Pellegrini: UAE trip had no impact|
|Koeman blames defeats on defensive lapses|
|Gundogan injury mars Dortmund preparations|
|Championship Review: Ighalo stars as Blackpool capitulate|
|Chelsea defeat a ´disgrace´ - Mourinho|
|Monk rues missed opportunity|
|Manchester City 0 Middlesbrough 2: Boro stun City with FA Cup shock|
|Chelsea 2 Bradford City 4: League One outfit dump out Premier League leaders|
|Tottenham 1 Leicester City 2: Late turnaround stuns Spurs|
|Cordoba 1 Real Madrid 2: Bale steals late win as Ronaldo sees red|
|Birmingham City 1 West Brom 2: Anichebe seals derby triumph|
|Southampton 2 Crystal Palace 3: Pardew´s men reach fifth round|
|Sunderland 0 Fulham 0: Defoe fails to fire on home debut|
|Bowyer hails ´terrific´ Blackburn|
|Rochdale v Stoke City: Shawcross in race to be fit for cup clash|
|Blackburn Rovers 3 Swansea City 1: Late goals snatch victory for Championship side|
|Congo v Burkina Faso: Le Roy vows to attack|
|Roma still in race for Scudetto - Garcia|
|Mancini coy on Toure links|
|Mertens rules out Napoli exit|
|Barzagli back in Juve squad|
|A-League Review: Adelaide and Sydney rack up the goals|
|Real have signed a ´diamond´ in Silva, says Oliveira|
|Queiroz: How can Williams sleep at night?|
|Asian Cup history ´the focus´ for Australia - Kruse|
|Pogba could be the world´s ´most expensive´ player|
|Australia international joins Dundee United|
|Real Madrid is a ´dream come true´ - Silva|
|Van Gaal angered by first-half showing in cup stalemate|
|Gourcuff laments ´cruel´ Gyan winner|
|UAE will head into semi-final with confidence, says Ali|
|Nice 2 Marseille 1: High-flyers downed on travels|
|St Johnstone 1 Aberdeen 1: Rooney earns title hopefuls a point|
|Cambridge United 0 Manchester United 0: Money´s men bag dream replay|
|Lucas Silva seals Real switch|
|Twente 2 Heracles 0: Strugglers left to rue Zomer error|
|Grant hails injury-time hero Gyan|
|South Africa 1 Senegal 1: Mbodji header denies Bafana Bafana|
|Red Star 2 Consolat Marseille 0: Allegro and Beziouen book Saint-Etienne tie|
|Parma deny Cassano legal action rumours|
|Ivory Coast v Mali: Renard demands more from captain Toure|
|Birthday boy Robben runs the show in five-goal Bayern romp|
|Saint-Etienne v Paris Saint-Germain: Blanc´s men look to reignite season|
|Ghana 1 Algeria 0: Gyan strikes at the last to boost quarter-final hopes|
|Juventus v Chievo: Llorente knows no let-up in title chase|
|Aston Villa v Bournemouth: Championship leaders in search of upset|
|Hughes rubbishes Bojan speculation|
|Brighton and Hove Albion v Arsenal: Wenger wary of attacking threat|
|Aguirre proud despite Asian Cup elimination|
|Bristol City v West Ham: Allardyce warns Premier League high flyers|
|Cameroon v Guinea: Mbia set for return|
|Inzaghi not fearful of the sack|
|Schalke sign teenager Sivodedov|
|Raiola plans to stand for FIFA presidency|
|Mourinho: Chelsea not planning to buy or sell in January|
|Queiroz praises battling Iran|
|Shenaishil lauds ´leader´ Mahmoud|
|Luis Enrique wary of Elche|
|Leeds confirm Cellino resignation|
|Japan 1 UAE 1 (aet, 4-5 pens): Stars cost champions´ progression|
|Pekerman: Falcao will come good|
|Allardyce awaiting Fletcher decision|
|Rodgers eager to keep Johnson and Lucas|
|Iran 3 Iraq 3 (aet, 6-7 pens): Shakir seals famous victory|
|Agent ´almost certain´ Ronaldo will retire at Real|
|Wenger calls for work permit changes|
|Lazio v Milan: Mauricio hopeful of debut|
|Inter v Torino: D´Ambrosio talks up Mancini impact|
|I was always confident - Benitez|
|Grant takes aim at AFCON organisers|
|Espanyol 3 Sevilla 1: Caicedo´s stunner sets up win|
|Rennes 1 Reims 1 (aet 5-4 on pens): Costil the the hero for last year´s runners-up|
|Napoli 2 Udinese 2 (aet 5-4 on pens): Holders edge through|