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'
|Colombian Primera A Review: Cali rise to the summit|
|Neville slams ´soft-centred´ United|
|Liga del Futbol Profesional Boliviano Review: San Jose go top|
|Ecuadorian Primera A Review: Barcelona move clear|
|Liga MX Review: Ronaldinho scores on league debut|
|Costa Rican Primera Division Review: Nunez fires again for Herediano|
|Paraguayan Division Profesional Review: Sol de America end streak|
|Serie A no two-horse race - Garcia|
|Venezuelan Primera Division Review: Tachira thrash Tucanes|
|Brazilian Serie A Review: Cruzeiro stunned late, Goias crush Palmeiras|
|Peruvian Primera Division Review: Melgar, Cesar Vallejo win again|
|Toronto FC 3 Chivas USA 0: Hosts end winless run|
|Ligue 1 Review: Pressure builds on Blanc, Monaco edge to victory|
|Al-Khelaifi gives Blanc vote of confidence|
|Mazzarri frustrated by draw|
|Luis Enrique salutes ´special´ Messi|
|Iachini laments missed chances|
|La Liga Review: Barca hammer Levante, Villarreal in two-goal comeback|
|Serie A Review: Zeman denied Roma revenge, Inter held|
|Paris Saint-Germain 1 Lyon 1: Umtiti adds to pressure on Blanc|
|Levante 0 Barcelona 5: Five-star Barca crush 10-man hosts|
|Palermo 1 Inter 1: Visitors´ progress checked|
|Arsenal v Southampton: Koeman calls for focus|
|Swansea City v Everton: Both sides looking to bounce back in League Cup|
|Police to investigate after Balotelli abused on Twitter|
|Liverpool v Middlesbrough: Rodgers keen to regain winning habit|
|Arabian Gulf League Review: Al Wahda maintain perfect start, Al Jazira held|
|Real Madrid v Elche: Hosts look to build on Depor demolition|
|Eredivisie Review: Ajax triumph in derby, PSV romp to victory|
|Warnock proud after victory at Goodison|
|Mourinho not interested in Pellegrini jibes|
|Pellegrini slams ´small team´ Chelsea´s approach|
|Bundesliga Review: Leverkusen slip up, Cologne held in derby|
|Martinez rues failure to build on strong start|
|Sewe Sport 1 AC Leopards 0: Kouame strike seals slender advantage|
|Scottish Premiership Review: Derby joy for Dundee United, Celtic held|
|Vita Club 2 CS Sfaxien 1: Hosts seize advantage in semi-final|
|Mixed emotions for Lampard after denying Chelsea|
|Irvine hails best day so far|
|Manchester City 1 Chelsea 1: Lampard denies former club|
|Everton 2 Crystal Palace 3: Howard mistakes cost hosts dear|
|Pearson praises Leicester City spirit|
|Van Gaal laments United collapse|
|Pochettino makes no excuses|
|CSL Review: Evergrande leave it late, Liaoning Whowin edge thriller|
|Leicester City 5 Manchester United 3: Hosts stage famous comeback|
|Tottenham 0 West Brom 1: Morrison gives visitors deserved win|
|Lee claims first Hong Kong gold in Incheon|
|Sunderland v Stoke City: Poyet again up for the cup|
|Ancelotti wants Real consistency|
|Dortmund hit by Mkhitaryan injury blow|
|Inzaghi pleased with Milan progress|
|Monk: Hodgson will be back|
|Pardew: Cisse should not have played|
|We cannot entertain title challenge - Rodgers|
|Bayern Munich v Paderborn: Visitors´ surprise start faces litmus test|
|K. League Review: Suwon close gap on top two|
|Empoli v Milan: Inzaghi eyeing top three|
|MLS Review: Wright-Phillips treble inspires Red Bulls rout|
|Bender: We lacked ambition|
|McInnes unhappy after ugly bust-up|
|Cambiasso impressed with Leicester mentality|
|Valverde: Champions League is not an excuse|
|Simeone wants improvement in discipline|
|Conte keeping tabs on Pelle|
|Marseille deserved to beat Rennes - Bielsa|
|La Liga Review: Real end slump with rout, Atletico share spoils|
|Hart unsure on City future|
|Primeira Liga Review: Quinta inspires first Penafiel win, Braga claim late draw|
|ES Setif 2 TP Mazembe 1: Late winner gives Algerians the edge|
|Inzaghi upbeat despite defeat|
|Victory not ´revenge´ for Allegri|
|Simeone defends Jimenez|
|Ligue 1 Review: Gignac double takes Marseille top|
|Patience pays off for Tevez and Juventus|
|Eredivisie Review: Vitesse drop points again, Dordrecht salvage late draw|
|Serie A Review: Allegri wins on Milan return, Empoli fight back|
|Milan 0 Juventus 1: Allegri wins on return to San Siro|
|Klopp rues Dortmund display|
|Allardyce lauds ´outstanding´ first-half performance|
|Coton Sport 0 Al Ahly 1: Soliman screamer puts Egyptians in command|
|Newcastle earned friends with comeback draw, claims Pardew|
|Liverpool ´nowhere near the standard´ - Rodgers|
|Atletico Madrid 2 Celta Vigo 2: Nolito penalty frustrates champions|
|Bundesliga Review: Zinnbauer stops Bayern as Paderborn go top|
|Lambert to close training ground after bug|
|Poyet blasts lacklustre Sunderland|
|Goals and wins are coming - Dyche|
|Koeman calm after Southampton move second|
|Bruce bemoans Hull errors|
|West Ham 3 Liverpool 1: Hosts punish sloppy Reds|
|Mainz 2 Borussia Dortmund 0: Klopp suffers miserable return|
|Guardiola: Fixture congestion taking its toll|
|Deportivo thrashing answered critics - Ancelotti|
|League Two Review: Accrington thrill on Coleman return, Bury go top|
|Bony ´distraught´ after dismissal - Monk|
|Pardew praises senior players after Hull draw|
|Wenger: Ozil showed mental strength|
|League One Review: MK Dons hit Crewe for six, Swindon crush Sheffield United|
|Championship Review: Fulham woes continue under Symons|
|Scottish Premiership Wrap: Inverness overhaul Hamilton at the top|
|Hughes credits QPR fans|
|Aston Villa 0 Arsenal 3: Ozil shines as Gunners get back on track|
|Swansea City 0 Southampton 1: Wanyama leaves it late to down 10-man hosts|
|Deportivo La Coruna 2 Real Madrid 8: Ronaldo hat-trick helps end visitors´ Liga slump|
|Newcastle United 2 Hull City 2: Late Cisse brace lifts pressure on Pardew|
|Burnley 0 Sunderland 0: Both sides await first league win|
|Hamburg 0 Bayern Munich 0: Zinnbauer starts Hamburg reign with impressive point|
|Hosts strike gold on day two in Incheon|
|Redknapp hails Kranjcar quality|
|QPR 2 Stoke City 2: Kranjcar spoils Hughes´ Loftus Road return|
|Howard not expecting European hangover|
|J.League Review: Gamba clinch Osaka derby, Tokushima Vortis on the brink|
|Vermaelen ´getting better every day´|
|Rafael: I want to stay at United forever|
|Ulloa determined to maintain strong form|
|Vidic adjusting to Serie A referees|
|Conte: There is room for a professional Balotelli|
|Mourinho wants tougher sanctions for FFP breaches|
|Milan v Juventus: Allegri returns to San Siro|
|Allardyce lauds in-form Downing|
|Real Salt Lake 5 Colorado Rapids 1: Poor visitors lose again|
|Mignolet "aggressive", says Rodgers|
|´Old´ City approaching dangerous position, says Neville|
|Shakhtar´s Donbass Arena hit by shelling|
|Song excited to face hero Gerrard|
|Everything is normal, says Ancelotti|