Spain completed their preparations for the Confederations Cup late Tuesday with a 2-0 friendly defeat of the Republic of Ireland in New York.
The world and European champions won thanks to late goals from super-subs Roberto Soldado and Juan Mata.
Soldado broke the deadlock in the 69th minute with a powerful drive, after being set up by defender Alvaro Arbeloa.
Mata sealed the won two minutes from time by making it 2-0 with a left-foot shot, after being play through by Santi Cazorla.
Spain started the match with veteran David Villa leading the attack but the Barcelona man, who is in poor form, looked sluggish and short on confidence and was replaced by the livelier Soldado.
The Valencia striker said: "I am delighted to have scored, it was an important goal...They defended well, it was not easy for us to break them down."
Another Spanish substitute who caught the eye was Iker Casillas, who made three important saves after coming on for Victor Valdes.
Manager Vicente del Bosque will have to choose between Casillas - who has hardly played since December because of a feud with coach Jose Mourinho at Real Madrid - and Valdes of Barcelona for the Confederations Cup.
Del Bosque said: "We have prepared well for the tournament with these two matches (the first was a 2-1 defeat of Haiti in Miami on June 8).
"All the players are looking keen and lively. We have suffered no injuries at all. For these reasons we are looking forward to going to Brazil."
Spain have been placed in Group B at the Confederations Cup, along with Uruguay, Nigeria and Tahiti. They will play their first game Sunday against Uruguay in Recife.
Most Popular Stories
- Tablets, Cars Drive AT&T Gains
- 2015 Mazda MX-5 Miata Is Fast and Eager
- Small Businesses Add 3 More Worries to Their List
- DOMA Tech Adding Jobs to Process VA Claims
- Apple Warns of China iCloud Attack
- Job Hunting Is Hard Work
- Tech Firms Flock to LA's 'Silicon Beach'
- Stocks Subdued After Gains Earlier in Week
- Ford, GM Expect to Report Strong Profits
- Consumer Prices Edge Up, Surprising Economists