Portugal on Sunday, lost the chance to qualify automatically for the 2020 World Cup.
The former European champions gave away a one-goal lead to lose 2-1 to Serbia in a Group A qualifier.
Renato Sanchez had opened the scoring for Portugal, but Dusan Tadic equalized in the 33rd minute of the game.
Aleksandar Mitrovic then climbed off the bench to grab a 90th-minute winner and complete a remarkable comeback.
The victory ensures Serbia takes top spot with 20 points.
They have three more points than second-placed Portugal, who only needed a draw to finish on top on goal difference and qualify.
Instead, Ronaldo and his team mates will head into the March playoffs with the other group-stage runners-up to try to reach Qatar 2022.