SALZBURG, Austria -- Dani Guiza and Ruben de la Red scored second-half goals Wednesday to rally Spain to a 2-1 win over defending champions Greece at the European Championship.
Angelos Charisteas made sure Greece avoided becoming the first title holders to exit without scoring a goal.
De la Red scored with a hard shot in the 61st minute and Guiza headed in the winner in the 88th.
The win was Spain's ninth straight and stretched their unbeaten run to 19 games.
Greece avoided becoming the first title holders to exit without scoring a goal, getting a 42nd-minute header from Angelos Charisteas.
But they are the only team at the tournament not to have earned a single point from three matches.
De la Red scored the equalizing goal in the second half with a hard shot that goalkeeper Antonis Nikopolidis got a hand on but couldn't stop.
Guiza, who led the Spanish league with 27 goals scored this season, then headed in the team's second goal off a cross from Sergio Garcia.
"It was important for us to win the game," said midfielder Xabi Alonso, who was voted man of the match after threatening the Greek goal with long-range shots throughout. "We complicated the first half but we're leaving satisfied."
Both Spain players scored their first goals for their country, which won Group D with a perfect nine points and will face Italy in the quarterfinals on Sunday in Vienna.
"We're taking it step-by-step. Now the classification is done and we were only thinking about this game," Alonso said. "Now Italy."
Charisteas, who scored the winning goal against Portugal in the Euro 2004 final, gave Greece the lead in the 42nd by heading in a free kick from Giorgos Karagounis.
Greece coach Otto Rehhagel made several changes to his lineup, looking to find the back of the net with Dimitris Salpingidis replacing Fanis Gekas, who fractured his cheekbone in the 1-0 loss to Russia.
"We wanted to say goodbye in an orderly way. And we did that," Rehhagel said. "I don't blame anyone individually. All the players followed my instructions."
Spain got off quickly, however, with De la Red failing to control Cesc Fabregas' early centering pass inside the area.
Greece started erratically but had its fourth free kick from outside the Spanish area by the 14th, which Spain defender Raul Albiol cleared.
Spain buzzed inside the Greek half, but the inexperienced lineup -- which featured six players with less than five appearances each -- couldn't find its rhythm.
Alonso couldn't find the net with two low shots from outside the area and nearly caught Nikopolidis out in the 23rd when the Liverpool midfielder shot from inside his own half but missed the top corner.
Moments after referee Howard Webb turned down a Spanish penalty plea by Andres Iniesta, Guiza was booked for a tackle on Nikos Spiropoulos that would lead to Charisteas' score. It was Webb's first game since awarding Austria a controversial injury-time penalty against Poland.
Alonso beat Nikopolidis with another powerful try in the 53rd but hit the post.
Spain had a new-look lineup on the field by the 58th when Aragones brought Iniesta off for Santi Cazorla, who had also come off the bench in Spain's victories over Russia and Sweden.
The latest win will help Spain's confidence going into the match against Italy, which Spain has never beaten at the European Championship or World Cup.
"We are confident in ourselves (against Italy). We know it's a complicated match. They are the world champions and we haven't had much success against them," Alonso said. "But we just have to have faith in ourselves."
The 37-year-old Nikopolidis and defender Paraskevas Antzas, who came on in the 62nd, played their last international game for Greece.