Morocco became the first African team to reach a World Cup semi-final with a battling victory over Portugal.

Youssef En-Nesyri’s first-half header proved enough as another defensive masterclass kept Cristiano Ronaldo and co at bay.

Pepe missed a golden opportunity late in injury time for Portugal, but Morocco held on and the final whistle sparked jubilant celebrations on the pitch and in the crowd.

Chances were scarce in a cagey start to the first half as Morocco continued to live up their reputation as one of the tournament’s most defensively accomplished teams.

Their compact low block was proving difficult to break down and the fluency Portugal showed in their last 16 dismantling of Switzerland was absent.

A hopeful long ball on the half-hour mark did present an opportunity for Felix to strike from the edge of the box, but his effort was deflected just over the bar.

Morocco grew more adventurous towards the end of the half, although Diogo Costa in goal seemed untroubled.

Out of nothing, though, the North African team found themselves in front. With 42 minutes played, a floating, hopeful cross into the box looked headed for the arms of the goalkeeper, but En-Nesyri produced a spring-like leap to rise above everyone and head home.

The game had come to life and Portugal very nearly levelled immediately. Bruno Fernandes, from a tight angle on the right, hit a dipping half-volley which bounced back off the crossbar. Moments later, the Manchester United man wanted a penalty after going down in the box but saw his protests ignored.

Match stats

Possession: 27% - 73%

Shots: 9 - 12

Shots on target: 3 - 3

Corners: 3 - 9

Portugal, in their eagerness to get a quick response, left themselves exposed, allowing Morocco to break only for Yahia Attiyat Allah to skew a shot wide at the end of a promising attack.

Costa was forced into a good reaction save shortly after the break as a Ziyech free kick wide on the right was whipped menacingly towards the near post.

Portugal boss Fernando Santos wasted little time in bringing Cristiano Ronaldo off the bench but the Europeans could still find no way through.

Goncalo Ramos sent a header just wide and Fernandes flashed a shot just beyond the crossbar as desperation for an equaliser increased.

Morocco, industrious and incredibly well-organised, were defending superbly. But they were indebted to their goalkeeper in the 82nd minute when Ronaldo set up Felix, whose ferocious left-footed effort was tipped over the bar by a flying Yassine Bounou.

The frustration amongst Portugal’s players and the staff on the touchline was palpable. They had been expertly shut out by a defence only breached once in Qatar.

As the game entered injury time, there was an opening for Ronaldo, who was played in behind but saw his low shot saved by Bounou.

Morocco were forced to play out the remaining minutes with ten men as substitute Walid Cheddira saw red for a second booking after a late tackle.

Even as they defended for their lives, Morocco were still able to break and Zakaria Aboukhlal should have done better one on one with Costa.

And with a minute left, Portugal had their chance. Rafael Leao curled a cross into the middle where Pepe, completely free, could only head wide from a few yards out.

That was it for Portugal, while Morocco’s remarkable journey continues.