• Striker Youssef En-Nesyri scored the winning goal in the first half, leaping highest to beat goalkeeper Diogo Costa to the ball.
• The north African side's supporters populated most of the venue and joyously celebrated their breakthrough moment for their continent on the global stage.
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 for their continent 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 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.
20:01
Post update
FT: Morocco 1-0 Portugal
No World Cup winners' medal and no club for Cristiano Ronaldo. What now for the 37-year-old?
Meanwhile, there are jubilant scenes on the pitch as Morocco's celebrations get started.
Boss Walid Regragui is being hoisted into the air by his players.
There are tears of joy in the Morocco crowd.
19:56
FULL-TIME
Morocco 1-0 Portugal
They've done it!
The Atlas Lions are roaring into the history books.
Morocco are the first team from Africa to reach the World Cup semi-finals.
19:48
RED CARD
Morocco 1-0 Portugal
Drama!
Morocco are down to 10 men.
Two yellow cards in the space of 60 seconds for Walid Cheddira.
19:48
Post update
Morocco 1-0 Portugal
One minute plus stoppages...
Morocco can taste victory, they can see the finishing line.
They're on the brink of becoming the first African side to reach the semi-finals.
It's been an astonishing effort by the Atlas Lions.
19:49
Eight minutes of added time.
Chance for Cristiano Ronaldo but Bono keeps his composure.
Portugal are running out of time.
19:46
YELLOW CARD
Morocco 1-0 Portugal
Substitute Vitinha goes into the book for a foul on Azzedine Ounahi.
Morocco are in no hurry to take the free-kick...
19:44
Post update
Morocco 1-0 Portugal
Portugal are on the attack. Bernardo Silva with a delivery into the box but it's over the head of Cristiano Ronaldo. Now they have won a corner. Tense moments...
19:43
Post update
Morocco 1-0 Portugal
Morocco are five minutes away from a World Cup semi-final. Let that sink in...
19:38
Post update
Morocco 1-0 Portugal
Three years ago Morocco suffered a shock defeat to Benin in the Africa Cup of Nations. Now they're minutes away from becoming the first African side to reach the World Cup semi-finals.
19:32
Post update
Morocco 1-0 Portugal
Some Morocco fans are praying in the stands!
Their team are closing in on an historic win. What can Portugal do?
They've just forced two quick corners but Morocco's defence continues to hold firm.
19:29
YELLOW CARD
Morocco 1-0 Portugal
This has not been a dirty game but the referee reaches for his pocket to book substitute Achraf Dari for hacking down Rafael Leao.
Into the final 20 minutes...
19:27
SUBSTITUTIONS
Morocco 1-0 Portugal
Another roll of the dice...
The highly-rated Rafael Leao has been sent on along with Vitinha.
Portugal need some magic from somewhere.
19:26
Post update
Morocco 1-0 Portugal
It's just not clicking for Portugal or Cristiano Ronaldo.
This is surely his last World Cup. Is it about to end in tears?
19:16
SUBSTITUTION
Morocco 1-0 Portugal
Bad news for Morocco. Their captain Romain Saiss cannot carry on.
His replacement is Achraf Dari who is making his fifth senior appearance for his country.
His job is to stop Cristiano Ronaldo!
19:09
SUBSTITUTION
Morocco 1-0 Portugal
Here he comes.
Jeers from Morocco's fans as Cristiano Ronaldo comes on for his 196th cap.
19:08
CLOSE!
Morocco 1-0 Portugal
What a delivery by Hakim Ziyech!
It's clears the heads of several players in a crowded penalty box but Diogo Costa has to be alert to keep it out
19:05
Post update
Morocco 1-0 Portugal
By the way, no changes for Portugal at the break.
They've won a corner within the opening 90 seconds of the second half but it's comfortably cleared.
19:03
KICK-OFF
Morocco 1-0 Portugal
A HUGE 45 minutes coming up...
18:48
HALF TIME
Morocco 1-0 Portugal
18:48
HITS THE WOODWORK
Morocco 1-0 Portugal
After a sedate start, this game bursts into life.
Portugal almost level through an incredible piece of individual brilliance by Bruno Fernandes, his attempt from the tightest of angles coming back off the bar.
18:38
GOAL - Morocco 1-0 Portugal
We have lift-off!
This might be a shock score line but it's not a surprise given the way the game has been played.
Morocco have been fantastic on the ball, that is one of the best goals of the tournament. the build-up through the midfield, little one-twos and the keeper is absolutely nowhere.
Technically, they have been the better team in this game and they deserve to be 1-0 up.
18:38
Post update
Morocco 0-0 Portugal
Around seven minutes plus stoppages before the interval. Morocco do not want half-time to come. They are enjoying their best spell going forward and their pace is causing Portugal problems.
18:29
Post update
Morocco 0-0 Portugal
The TV cameras zoom in on the Portugal bench and pick out a stern looking Cristiano Ronaldo. He doesn't look impressed with what he has seen so far.
18:27
Post update
Morocco 0-0 Portugal
Half a chance for Morocco.
Youssef En-Nesyri rises high to meet a set-piece but his header flies over the bar.
They've still to test Portugal keeper Diogo Costa in what has so far been a cagey game.
18:25
Ouch!
Bono goes up to pluck a cross out of the air but is completely flattened by Bruno Fernandes.
The referee races over to the two players. It's fair to say Morocco's players were not impressed with Fernandes for that.
18:21
Post update
Morocco 0-0 Portugal
Morocco win their second corner. Judging by the noise, you would think they had scored. What a din.
18:13
Post update
Morocco 0-0 Portugal
Free-kick to Portugal after Otavio is on the receiving end of a crunching challenge by Yahya Attiat-Allah. It's pinged into the box and Morocco need a couple of attempts to get it clear.
18:07
Post update
Morocco 0-0 Portugal
Morocco immediately respond with an attack of their own which ends with a chance flying over the bar but it would not have counted as there was an offside.
Nevertheless, this has been a lively start.
CLOSE!
Morocco 0-0 Portugal
A huge chance for Portugal!
A free-kick is delivered into the Morocco box and Joao Felix forces Bono into a flying save.
That was a powerful header and the Morocco keeper did well to beat it behind for a corner.