Youssef En-Nesyri’s first-half header secured a historic win for Morocco, who will play defending champions France or England for a place in the final.
The 37-year-old Ronaldo, one of soccer’s greatest players, didn’t start for the second straight game but came on as a substitute in the 51st minute.
The five-time world player of the year is set to finish his career without capturing the World Cup or ever getting to the final.
Morocco will play either France or England in the semi-finals.