NBA champion Marc Gasol saved Spain on Friday as they beat Australia after a thrilling double overtime and will play Argentina in the Basketball World Cup final.
An enthralling semi-final between Australia and Spain was 71-71 at the end of regulation time and the two sides could not be separated at the end of a nervy first overtime.
Finally, the 2006 world champions Spain jubilantly emerged in Beijing to reach Sunday's final after the Boomers appeared to run out of juice.
Sergio Llull hit two three-pointers in the second overtime for Spain to cap their comeback 95-88, having trailed for long periods during regulation time.
Gasol, the Toronto Raptors centre, finished with 33 points, six rebounds and four assists after stepping up when his country needed him most.
"We came back, we stuck together through tough times, that means a lot," said the 34-year-old, a three-time NBA All-Star.
The Spaniard played a key role in the Raptors' historic run to the NBA crown and knows that victory against Argentina on Sunday will cap the perfect season.
"It's been great, I have been very fortunate," he said.
"I knew that it would not be easy physically (going from the NBA Finals to the World Cup) but it's definitely worth it.
"Not because of the final but passing along those values to the team. It's our turn to pass on the legacy to the next generation (of the Spain team)."
Ricky Rubio was also pivotal once more for Spain with 19 points, 12 assists, seven rebounds and four steals.
Red-hot Patty Mills, one of the players of the World Cup, was unfortunate to be on the losing side, leading Australia with 34 points.
He did though miss a free throw with four seconds left in regulation that would have put Australia in the final for the first time.
Australia coach Andrej Lemanis called it "a hell of a game of basketball and fun to be involved with".
"Tough to lose, no doubt, it comes down to a couple of plays here and there," he said.
"At the end of the day, we had chances to win the game, we had every opportunity to win the game."
- 'Complete domination' -
Argentina are one win away from their first World Cup title since 1950 after they brushed aside France 80-66 in the other semi-final.
Cheered on by a group of fans decked out in their national colours, Argentina made a fast start against France, who had ousted the US in the previous round.
Argentina opened the game up with a 10-2 run that saw Luis Scola, the age-defying 39-year-old, dominate the court.
The South Americans led 39-32 at half-time and were never in serious danger of surrendering their advantage after that.
Scola, the grand old man of basketball, finished with 28 points, 13 rebounds and two assists. He was given a huge ovation when he stepped off the court near the end.
Argentina coach Sergio Hernandez gave an insight into what drives the veteran.
"In the locker room, he said, 'We have 25 minutes to celebrate, after that we turn off the noise, no social media, just focus on the next game, it's 40 minutes to make history'," Hernandez said.
"That's why he is still playing."
France will play Australia for bronze on Sunday and Rudy Gobert, a two-time NBA Defensive Player of the Year, had no complaints.
"They were just the better team from the first minute to the last, more aggressive, played better as a team," said the towering Frenchman.