Spain have secured third place at the Confederations Cup football tournament in Soth Africa when Xabi Alonso curled home a long-range free kick to give them a 3-2 win over the hosts after extra time.
Alonso's 107th minute effort evaded both his own strikers and the home defence to settle a thrilling match.
Brazil meet the United States later today in the final.