Cesc Fabregas scored a penalty at the second attempt in injury time to give Spain a 3-2 win over Chile in a friendly on Friday.
Midfielder Isla Mauricio and forward Eduardo Vargas put Chile ahead, but Andres Iniesta came off the bench in the second half to score with a long strike before setting up Fabregas for the equalizer.
Chile goalkeeper Claudio Bravo blocked Fabregas' spot kick, but the new Barcelona midfielder tapped in the rebound for the victory.
Spain continues its defense of its European title on Tuesday when it hosts Liechtenstein in a 2012 Euro qualifier.
Chile will also visit Spain to play Mexico in a friendly in Barcelona on Sunday.
World champion Spain has never lost to Chile in nine meetings.