Spain beat Australia 95-88 in double overtime to claim a place in the Basketball World Cup final in China.
The second-ranked team were on the verge of going out before Australia’s Patty Mills missed one of two free throws with 4.7 seconds of regulation time left to leave the game tied 71-71.
Spain took control in the second of two added periods to reach their first final since their 2006 win.
France take on Argentina in the second semi-final later on Friday.
Spain’s NBA champion Marc Gasol was his team’s top scorer, the Toronto Raptors star hitting 33 points in the comeback victory, while point guard Ricky Rubio contributed 12 assists.
Mills, the San Antonio Spurs point guard, was Australia’s driving force, leading all scorers with 34 points.