Morocco became the first African nation to reach a World Cup semi-final and ended the hopes of Cristiano Ronaldo's Portugal.
Striker Youssef En-Nesyri scored the winning goal in the first half, leaping highest to beat goalkeeper Diogo Costa to the ball and heading in to spark pandemonium at Al Thumama Stadium.
The north African side's supporters populated most of the venue and joyously celebrated their breakthrough moment on the global stage.
Ronaldo came off the bench in the 50th minute to equal the men's all-time appearance record of 196 in international matches, but he could not drag his side back into the contest.
Morocco, who will face England or France in the last four, were happy to play on the counter and grabbed the opener just before the break when En-Nesyri headed in from Yahya Attiyat-Allah's cross.
Portugal skipper Bruno Fernandes came agonisingly close to levelling just minutes later but a brilliant individual effort struck the crossbar.
Decimated by injuries, Morocco sat back for the majority of the second half and Yassine Bounou brilliantly tipped over Joao Felix's drive - the closest they came to an equaliser.
Morocco striker Walid Cheddira was sent off for a second yellow card in eight minutes of additional time but Portugal could not find the equaliser as their last-four hopes were dashed.
Magnificent Moroccans make history
Three African sides had previously reached this stage of the World Cup but none had progressed any further. Until now.
The marvellous Moroccan players and fans rejoiced as En-Nesyri's header on 42 minutes proved to be the pivotal moment.
Fans whistled and jeered every pass the Portuguese players made and then the rowdiest section behind the goal seemed to suck the ball into the net.
Walid Regragui's side were missing West Ham's Nayef Aguerd, Bayern Munich's Noussair Mazraoui and lost captain Romain Saiss to injury early in the second period.
But they defended resolutely and frustrated Portugal to keep their seventh clean sheet in eight games under their boss and have conceded just once in this tournament.
Morocco are a tough proposition and buoyed on by a partisan crowd in Doha, they will present a difficult challenge to whoever they face in the last four on Wednesday.
Goalkeeper Bounou, earning his 50th cap, pushed away a header from Felix early on and a deflected strike flew narrowly over.
Morocco had carved out the better opportunities on the break but En-Nesyri sent two free headers off target and Sofiane Boufal's curler was straight at Costa.
In his desperation for an equaliser, Fernando Santos sent on Ronaldo early in the second half but the 37-year-old - who equalled Kuwait striker Bader Al-Mutawa's international caps record - found it difficult to make any impact.
Having seen rival Lionel Messi reach the semi-finals on Friday, Ronaldo could not do the same with his side on what is likely to be his final World Cup appearance, trudging down the tunnel in tears at full-time as his dream was over.
Latest Stories
-
US Supreme Court to hear TikTok challenge to potential ban
2 minutes -
Amazon faces US strike threat ahead of Christmas
34 minutes -
Jaguar Land Rover electric car whistleblower sacked
41 minutes -
US makes third interest rate cut despite inflation risk
46 minutes -
Fish processors call for intervention against illegal trawling activities
58 minutes -
Ghana will take time to recover – Akorfa Edjeani
2 hours -
Boakye Agyarko urges reforms to revitalise NPP after election defeat
2 hours -
Finance Minister skips mini-budget presentation for third time
2 hours -
‘ORAL’ team to work gratis – Ablakwa
2 hours -
Affirmative Action Coalition condemns lack of gender quotas in Transition, anti-corruption teams
2 hours -
December 7 election was a battle for the ‘soul of Ghana’ against NPP – Fifi Kwetey
2 hours -
Social media buzzing ahead of Black Sherif’s ‘Zaama Disco’ on December 21
2 hours -
Afenyo-Markin still suffering from the massive defeat – Fifi Kwetey
2 hours -
Retain Afenyo-Markin as NPP leader, he has experience – Deputy Speaker
3 hours -
Kufuor didn’t leave behind a strong economy – Fifi Kwetey
3 hours