(CNN) -- Cristiano Ronaldo rose above the frenzied speculation about his club future to fire Portugal to a second successive victory at Euro 2008, inspiring a 3-1 triumph against the Czech Republic in Geneva.
Cristiano Ronaldo fires the ball past Petr Cech as Czech goalscorer Libor Sionko looks on.
The Manchester United winger scored his 21st goal in 57 games for his country, sliding a first-time shot past goalkeeper Petr Cech in the 63rd minute, and then set up substitute Ricardo Quaresma in the first minute of time added on to make the Portuguese the first team to reach the quarterfinals.
The beaten 2004 finalists went through ahead of their final Group A match against Switzerland after the co-hosts were beaten 2-1 by Turkey in Wednesday's later match for a defeat which ended their tournament.
The Czechs, who like Portugal won their opening Group A match, will face the Turks on Sunday needing to win to qualify for the last eight.
Portugal took an eighth-minute lead when midfielder Deco scrambled the ball into the net via the legs of Czech defender Marek Jankulovski after Cech blocked Ronaldo's burst into the box with his legs but was unable to gather.
The Czech Republic took advantage of Portugal's aerial weakness at set-pieces as Libor Sionko leveled in the 20th minute with a powerful header from Jaroslav Plasil's corner.
Deco, who is expected to leave Spanish club Barcelona after the tournament, had a chance to put Portugal back in front but blazed over the bar after cutting in from the right wing.
Sionko almost had a second goal in the 29th minute when goalkeeper Ricardo flapped at another corner, but Joao Moutinho cleared his header off the line.
Ronaldo, who is being courted by Spanish champions Real Madrid, twice tested Cech in the final minutes of the first half -- the Chelsea keeper denied the 23-year-old's long-range effort with a fine flying save and then smothered his dipping free-kick.
Captain Nuno Gomez had a chance to put Portugal ahead again 10 minutes after the break after robbing David Rozenthal, but the Lazio defender recovered to block his shot.
Cech then denied Simao Sabrosa, and at the other end Tomas Ujfalusi's header flashed past the past from another corner with Sionko and Milan Baros both just failing to make a vital connection.
Just a minute later, Ronaldo popped up to put Portugal in the lead for the second time with a sharp right-foot effort from just inside the penalty area after Deco cut inside and slid the ball into his path.
The Czechs battled bravely for an equalizer, but Sionko saw his 83rd-minute header tipped over by Ricardo from yet another set-piece when it seemed he should have scored.
Czech coach Karel Bruckner brought on giant striker Jan Koller, dropped to the bench after the win over the Swiss, but the country's all-time record scorer could not make the required impact.
Instead it was Ronaldo who settled the match, racing clear after beating the offside trap on the counterattack and unselfishly squaring the ball to Quaresma after drawing Cech out of his goal.
"It was a surprise for me because we had planned to play against a starting XI that would include Koller," Portugal coach Luiz Felipe Scolari told reporters, before it was later announced the Brazilian had been named as the new manager of English Premier League club Chelsea.
"The fact Baros was there didn't make life easy. We faced difficulties because they had four or five in midfield and we had two wingers so we didn't know what to do."
Bruckner added: "In the second half, we saw the team get a bit tired and our opponents put in a perfect performance in attack. Portugal did not go for counter-attacking only -- they were able to make perfect transitions from attack to defence.
"They played very well. But it's not over for us. We still have the third match and we are ready for that."