Portugal nearly lost to Iran in their third group stage match at the World Cup, but the Euro 2016 champions held on for a 1-1 draw to finish second in Group B, knocking out their opponent in the process. Ricardo Quaresma scored a gorgeous three-toe curler in the first half, Cristiano Ronaldo had a penalty kick saved and Iran made a penalty of its own before nearly winning the match at the end. Had Iran not scored a late penalty, Portugal would have moved on as the group winner and faced Russia in the round of 16, but will instead get Group A winners Uruguay.

In a match that was more competitive than most thought it would be, Portugal once again failed to impress, but got the result it needed. The team controlled possession but was shaky late, as Karim Ansarifad missed a golden chance from inside the box to win it. 

This goal from Quaresma proved to be enough for Portugal to earn the point.

And as Portugal was trying to hold on, Ronaldo was taken down in the box and had his penalty shot saved by Ali Beiranvand:

Iran then made it 1-1 in the 93rd minute with a penalty kick, but couldn't get the winner in the remaining three minutes, sending Portugal as the second-place team into the next round. They'll next play red-hot Uruguay on Saturday in the round of 16 at 2 p.m. ET. You can stream all World Cup matches with fuboTV (Try for free). 

Relive Portugal vs. Iran match commentary

If the live blog doesn't load properly, click here.

For news, stories, results and more, follow us:

- @CBSSportsSoccer - @RGonzalezCBS - Facebook