LENS, France -- Substitute Ricardo Quaresma scored in the 117th minute to help Portugal beat Croatia 1-0 on Saturday and advance to the European Championship quarterfinals.
Portugal settled a poor game with its only serious attack, when Cristiano Ronaldo's one shot all match was parried by goalkeeper Danijel Subasic across the goalmouth in the second half of extra time. Quaresma stooped to head the ball into an unguarded net from close range.
Portugal had broken away in a rare fast attack after Croatia forward Ivan Perisic struck the post with a shot.
Portugal will play Poland in the quarterfinals on Thursday in Marseille. It is clearly in the weaker half of the bracket, avoiding Spain, Italy, Germany and France until the final on July 10.
Somehow, Portugal and 31-year-old Ronaldo have a chance to win an elusive first title after three draws in the group stage and looking incapable of scoring in a cautious, mistake-filled match in the last 16.
Neither side aimed a shot or header on target until extra time, and the match only sparked into life in the closing minutes.
Two technically gifted teams, which were among the best attacking forces at Euro 2016, disappointed in the 90 minutes. It ended with whistles from the crowd.
Portugal showed more attacking intent after a spoiling first half when 18-year-old Renato Sanches came on as a 50th-minute substitute. Sanches had a clear chance in the 57th but pulled his right-footed shot well wide.
Neither side aimed a shot or header on target before extra time, and there was not any attempt on goal until 24 minutes passed.
For once, Croatia's red-and-white checkerboard shirts were more suited to a chess match than soccer.
Ronaldo saw little of the ball. His most decisive acts in the 90 minutes were two clearances in his own penalty area.
Still, after being so prolific in the group stage -- Ronaldo's 32 goal attempts had been more than eight team totals, including Italy's -- his first attempt in Lens helped Portugal into the last eight.