Juventus beat Udinese with two goals to Friuli in the 34th round of the Italian League.
Nahuel Molina advanced to Udinese from a penalty kick in the 10th minute.
Ronaldo scored the equalizing goal in the 83rd minute with a penalty kick.
In the 89th minute, Ronaldo came back and scored the second goal after successfully turning Adrien Rabiot’s cross into the net.
The Juventus victory raised its score to 69 points to finish third, behind Atalanta, who has the same points balance but excels in direct confrontations and ranks second.
Juventus is also ahead of Milan, who also has 69 points, and ranks fourth.
Juventuss stumble would have made them ranked fifth in disqualification for the Champions League, but the Ronaldo double kept manager Andrea Pirlos hopes of qualifying for the European competition next season.
And Udinese balance stuck at 39th point, to occupy the eleventh place.
And Ronaldo strengthened his top scorer in the Italian League, reaching 27 goals.
Juventus conceded at least one goal for the tenth consecutive match, to be the second worst defensive era for the team since it had scored goals in 19 consecutive matches last season.
Juventus will play Milan in the next round, while Udinese will play Bologna.
Juventus lost the Italian League to Inter after controlling for 9 years the title.