European champions Spain have battled back from a 13-point deficit to beat Russia 67-59 and reach the Olympic men's basketball final for the second successive time.
Spain will meet either 2008 champions United States or 2004 Olympic winners Argentina - who play later on Friday - in Sunday's gold medal game, while Russia will play for the bronze.
Outplayed in the first half, the 2008 Beijing silver medallists dominated play over the last 20 minutes, outscoring the Russians 47-28 to come back after a poor first half.
"The first half just didn't flow good for us, it felt like the rim was getting smaller and smaller," Los Angeles Lakers forward Pau Gasol told reporters. "We just had to relax and make a few shots to open things up."
It was a different view from the Russian side.
"I thought we played one of our best first halves of basketball ever," said Russia coach David Blatt.
"We had only three turnovers in the first half, playing right, making good decisions and good team actions. In the second half, we got away from that. Give them some credit."
Gasol led Spain with 16 points, while Jose Calderon posted 14 points, all but two of them coming in the second half as he found his touch from the three-point line.
Sasha Kaun was top scorer for Russia with 14 points.
Russia began the game doing their offensive damage inside and then found their shooting touch in the second quarter on a 10-0 run to build a 27-14 lead before finishing the half leading 31-20.
"The first half we took good shots, but in the second we just stopped executing," said Andrei Kirilenko, a former National Basketball Association All-Star, who was slowed by a quadriceps injury.
Spain had a miserable time scoring in the first half, shooting a consistently woeful 21 percent, making 3-of-15 shots in the first quarter and 3-of-14 in the second quarter.
An energised Spanish team hit the floor after the break, playing with more quickness and defensive intensity.
"We had a really good talk in the locker room at halftime," Calderon said.
"In the first half it looked like we wanted to make it to the final with every shot. We just needed to have some patience, maybe. You have to be able to play in these games."
A Calderon three-pointer at the buzzer tied the game 46-46 at the end of the third quarter and European champions Spain continued their revitalised play through to the end to book another appearance in the gold medal game.
"To make it to a second Olympic final running is huge," said Pau Gasol.
Spain coach Sergio Scariolo said, "It's an unbelievable emotion to know you have an Olympic medal. This is something that millions of great sportsmen dream about."