RIO DE JANEIRO (AFP) - NBA star Pau Gasol scored 31 points and grabbed 11 rebounds as Spain captured the Rio Olympics men's basketball bronze medal Sunday by defeating Australia 89-88 in a thriller.
The Spaniards grabbed a third consecutive Olympic podium finish after silver medals in 2008 and 2012, having lost each time in the championship game to the United States.
Patty Mills, one of four NBA champions on the Australia roster, scored 30 points to lead the Boomers, who just missed out on their first Olympic men's basketball medal.
Aussie Aron Baynes was whistled for a foul on Gasol with 28 seconds remaining and the Spaniard hit both free throws to put his team ahead 87-86.
Baynes sank a hook shot with 9.7 seconds remaining to put Australia back in front.
But then Mills was called for a blocking foul on Sergio Rodriguez as the guard drove to the hoop and the Spaniard hit two free throws to create the final margin.
Australia had the final possession but lost the ball and could not get off a final shot before the buzzer sounded.
The Aussies, who had talked about taking gold, settled for matching their best-ever Olympic finish of fourth from 1988, 1996 and 2000.
Ryan Broekhoff scored five points to lead an 11-3 Australia run that put the Boomers ahead 75-73 with 5:46 to play.
The lead quickly changed hands four times after that, the game hanging on a knife's edge, before Gasol sank a fadeaway jumper to put Spain ahead 81-80 with 2:27 remaining.
Baynes answered with a jumper to reclaim the lead for Australia before Gasol struck again for two.
Mills responded for the Aussies but Rodriguez followed with an inside jumper that put Spain back in front 85-84 with 89 seconds remaining as the tension mounted.
Mills missed an open jump shot but Nikola Mirotic fouled the Boomers' David Andersen on the rebound and the Aussie made both free throws to put the Down Under squad ahead 86-85 with 35 seconds remaining, setting up the final drama.