MADRID, Spain  Spain beat defending champion Greece and Russia defeated Lithuania on Saturday to reach the final of the European basketball championship on Sunday.

Pau Gasol of the NBA's Memphis Grizzlies scored 23 points and Jose Calderon made some big plays down the stretch in Spain's 82-77 victory in the first semifinal.

In the second, Andrei Kirilenko had 29 points and three blocks, and Russia withstood 30 points from Ramunas Siskauskas for a 86-74 victory that put the Russians in their record 19th final.

"We showed that when we have to fight in difficult moments, we know how to respond," Calderon said. "It was a really tough game ... even the coaches had to play hard in this game. It was a war."

After the Toronto Raptors' Jorge Garbajosa hit two free throws to give Spain an 80-76 lead with 18 seconds to play, Theodoros Papaloukas lost the ball as he drove the lane. Juan Carlos Navarro, who also finished with 23 points, then hit two free throws at the other end. Calderon, a Raptors guard, scored 18 points.

Vassilis Spanoulis led Greece with 24 points and five assists in the game played before a capacity crowd of 15,500.

Spain reached its sixth final in a bid to become only the third nation to lift the European crown while holding the world title. It beat Russia 81-69 in the group stages.

The Spaniards set the tone against Greece from the start, taking a 37-26 lead with 5:16 to play in the second.

But Spanoulis scored seven points during a 13-4 run and Greece closed to 41-39 at halftime.

Siskauskas' 3-pointer cut Russia's lead to 65-61 to start the final period, but Utah Jazz forward Kirilenko and U.S.-born guard Jon Robert Holden responded to keep Lithuania from getting closer.

"This tournament we have not quit, not once," Russia coach David Blatt said. "In this tournament, we have played to win."

Holden finished with 18 points and Chicago Bulls forward Victor Khryapa chipped in 15 for Russia, which returned to the final for the first time in 15 years.

Russia held a 25-12 first period lead behind 67 percent shooting, but Lithuania slowly rallied, pulling within 40-33 at the half.

Siskauskas' jumper at 4:01 of the third capped a 17-9 run that drew Lithuania even for the first time.

But Kirilenko answered, scoring eight of Russia's next 13 points and blocking a dunk attempt as Russia moved back out 65-54.

"He's the best player in Russia, one of the best in the world," center Nikita Morgunov said of his teammate.

Greece will play Lithuania Sunday with the winner automatically qualifying for next summer's Olympic Games.

Earlier, Dallas Mavericks forward Dirk Nowitzki, who finished with 26 points and 10 rebounds, hit a clutch basket with 12 seconds to play as Germany rallied for a 69-65 win over Slovenia that gave the Germans a chance to qualify for next summer's Beijing games.

Croatia also earned a place in a pre-Olympic qualifying tournament in July with an 86-69 win over France, which got 18 points from San Antonio Spurs guard Tony Parker.

France will play Slovenia on Sunday for the last spot in the qualifying tournament. The two teams, along with Germany and Croatia, were eliminated in the quarterfinals.

Spain had already clinched a place at next year's Beijing Olympics thanks to its world championship win over Greece last year.