LJUBLJANA, Slovenia -- Greece rallied with a big fourth quarter to beat defending champion Spain 79-75 Thursday in the second round of the European basketball championship.

Trailing by five at the end of three quarters, Greece outscored Spain 27-18 in the fourth to gain a win that could prevent Spain from winning a third consecutive title.

Vassilis Spanoulis led Greece with 20 points. Rudy Fernandez and Marc Gasol both had 20 for Spain.

Greece was down by 10 at the end of the first quarter, but used the absence of Gasol in the second quarter to take the lead 41-38 at halftime.

Gasol collected three personal fouls in the first quarter and sat out the second.

"Marc plays 40 minutes in the NBA and never fouls out, he knows how to take care of himself. I don't know what happened here," Spain coach Juan Orenga said.

Gasol returned in the third, scored 11 straight points, and Spain outscored Greece 19-11 to regain the lead 57-52 but couldn't hold on to it.

Slovenia's guard Goran Dragic scored 22 points to help beat Italy 84-77. His brother Zoran added 15 as they scored all nine of Slovenia's points in the last two minutes of the game, including a 3-pointer by Goran with 17.5 seconds left.

Italy was the only team to finish the group stage with a perfect 5-0 record, but fell in its first second-round game against an inspired host team carried by the partisan crowd.

Earlier, Croatia used its size to rout Finland 88-63 for its first victory in the second round.

Croatia's big men dominated the boards as the team pulled down 47 rebounds, while Finland finished with 30.

Damjan Rudez made five of eight 3-point attempts and finished with 17 points. Center Damir Markota had 11 rebounds, shooting guard Bojan Bogdanovic scored 15 and center Ante Tomic had 11 points and seven rebounds.

"We controlled the boards and we got many easy baskets," Tomic said.

Croatia outscored Finland 44-10 in the paint.

Croatia's defense also shut down Finland's top scorer, Petteri Koponen, whose first points came when he made a 3-pointer at the buzzer of the third quarter. He finished with five points.