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'
|Sporting Lisbon 2 Roma 0: Slimani, Mane inspire Portuguese hosts|
|Rodgers feeling ready for new campaign|
|Khedira to miss Supercoppa|
|Paris Saint-Germain 2 Lyon 0: Aurier and Cavani seal more silverware|
|Wolfsburg 1 Bayern Munich 1 (5-4 on penalties): Super-sub Bendtner nicks it for Pokal champions|
|Lampard´s long-awaited New York City debut ends in defeat|
|Casillas the spot-kick hero for Porto|
|Monk bullish ahead of season opener at champions|
|Marseille 2-0 Juventus: Night to forget for Serie A champions|
|Swansea end pre-season with yet another draw|
|HJK 0 Liverpool 2: Origi and Coutinho on target|
|Juventus rocked by Khedira injury scare|
|Lens and Pantilimon star as Sunderland beat Hannover|
|Pardew hopeful of concluding Wickham deal|
|Martinez allays Lukaku fears|
|Stuttgart 4 Manchester City 2: Cause for concern for Pellegrini|
|Wasteful Bournemouth held by Hoffenheim|
|Jerome seals Norwich win|
|Souare´s first goal ensures Palace draw|
|Sinclair hits hat-trick in Villa draw|
|Leicester end pre-season with thrilling Birmingham win|
|Wood and Mowatt condemn Everton to friendly defeat|
|Coloccini not involved as Newcastle lose to Gladbach|
|Borussia Dortmund 2 Real Betis 0: Ramos scores on return from injury|
|Stoke lose to Cologne on Afellay debut|
|Norwich capture goalkeeper Kean|
|Jovetic hits out at Pellegrini following City exit|
|Jones backing new boys to spark United revival|
|Scottish Premiership Review: Celtic up and running, Dundee hammer Kilmarnock|
|Can keen to learn from Milner|
|Immobile on the mend following friendly scare|
|Sagan Tosu 1 Atletico Madrid 1 (1-4 on penalties): Simeone´s men need spot-kicks|
|Cahill: Big-spending rivals will make title race tougher|
|Roberto happy to play full-back for Barca|
|Gestede eager to make his mark at Villa|
|I want to play more and score more - Remy|
|Lambert influence important, says Pulis|
|Benteke a ´bargain´ buy - Rodgers|
|Zola: Qatar would be ideal for Balotelli, Cassano|
|Suarez: I´m not among world´s best|
|PSG ready despite ´chaotic´ pre-season - Blanc|
|Arsenal thumping still hurts - Fournier|
|Aubameyang targets Champions League success|
|Rooney set for Everton return|
|Cech can match Van der Sar - Wenger|
|Mourinho ponders Wenger´s losing record against him|
|CBF confirm Fred failed a doping test|
|Bournemouth beaten by battling Cardiff|
|Immobile injury overshadows Sevilla win at Vicarage Road|
|Lambert at the double on West Brom bow|
|Real sign up Spain starlet Vallejo|
|Valencia blow for West Ham|
|Elche cleared to play in Segunda Division|
|Baker pens a new Villa deal|
|Lambert makes Albion switch|
|Gillingham and Scally found guilty of ´race victimisation´|
|Inter complete Jovetic signing|
|Arsenal v Chelsea: Mourinho cools Wenger rivalry ahead of Wembley meeting|
|Villa snap up Gestede|
|Villa land Veretout|
|Mourinho coy on fresh Stones bid|
|Aubameyang commits to Dortmund|
|Torres on the hunt for trophies with Atletico|
|Cazorla and Walcott sign new Arsenal deals|
|Quick start vital in Arsenal title bid - Wilshere|
|I have received no offers - Guardiola|
|Barcelona to monitor Turan injury|
|Zorc ´surprised´ by Grosskreutz-Tuchel row|
|Phil Neville could be England manager - Moyes|
|UEFA to investigate Shakhtar´s Fred selection|
|City loan Unal to Genk|
|China v South Korea: Stielike looking for new options|
|North Korea v Japan: Halilhodzic to unearth new faces|
|Drogba: I want to be ready, not a burden|
|Hamstrung Clasie in doubt for Southampton league opener|
|West Ham goalscorer Zarate bemoans Astra comeback|
|Negredo quashes Valencia exit rumours|
|´This is not my Sampdoria´ - president Ferrero|
|Criscito could join Inter - agent|
|CBF endorse Zico´s FIFA presidency campaign|
|Hawit to handle CONCACAF´s referee review|
|Falcao is a ´top, top player´ - Terry|
|Tuchel pleased by Dortmund fighting qualities|
|Premier League rules out schedule changes for Champions League clubs|
|UEFA Europa League Review: Southampton stroll as Sampdoria are humiliated|