Marc Gasol inspired Spain to victory in an epic FIBA World Cup semi-final against Australia ©Getty Images

Spain earned an historic victory over Australia to reach the final of the International Basketball Federation (FIBA) World Cup in China, prevailing 95-88 in the first-ever double-overtime elimination game in the competition.

Facing them in Sunday's final at the Wukesong Arena in Beijing will be Argentina, who defeated France 80-66 in the second semi-final.

Spain now have a chance to join United States, Yugoslavia, Soviet Union and Brazil as only the fifth country to win multiple World Cup trophies.

For Australia, a semi-final represented their best-ever World Cup finish, beating their fifth places in 1982 and 1994.

The Australians will now be desperate to secure their first global medal in Sunday's bronze medal match with France, having missed out in the Olympics on four occasions.

Spain's Marc Gasol claimed TCL Player of the Game as he scored 33 points, while Ricky Rubio collected his first World Cup double-double with 19 points, 12 assists, seven rebounds and four steals.

Sergio Lllull added 17 points and 6 assists in helping Spain secure their second World Cup medal following the title 13 years ago.

Australia suffered their first loss of the tournament despite Patty Mills scoring 32 points and Nick Kay coming off the bench for 16 points and 11 rebounds.

Australia led by eight points with seven minutes left in regulation when Gasol brought Spain back into the game and made two free throws for a 71-70 lead with 8.7 seconds left.

Mills then split two free throws with 4.7 seconds to play to force overtime.

Gasol then calmly sank two free throws with just seconds to play to send it to double overtime.

And Australia just failed to go that little bit further.

"It's a great feeling to be in the final," said Spain coach Sergio Scariolo.

"I want to congratulate all my players.

"I want to congratulate Australia. They had an awesome game and they fought until the very end."

France had no answer to Argentina's 39-year-old Luis Scola, left, in today's FIBA Men's World Cup semi-final in Beijing ©Getty Images
France had no answer to Argentina's 39-year-old Luis Scola, left, in today's FIBA Men's World Cup semi-final in Beijing ©Getty Images

Argentina’s success was inspired, as so often in the past, by 39-year-old Luis Scola, who totalled 20 points and 13 rebounds to lead his country into their first World Cup final since 2002, when they lost to Yugoslavia.

France, who had started the rot for defending champions United States at this tournament by beating them in the quarter-final, kept the match tight for the first half, but had no answer to the range of South American attacking options.