Spain were given a tough run out in Equatorial Guinea but goals from Santi Cazorla and Juanfran gave them victory in Malabo.
Jimmy Bermúdez surprisingly cancelled out Cazorla's early opener, but Juanfran restored the lead for La Roja before the break, and his side eventually saw out the win. Vicente del Bosque's side head to South Africa next, where they will continue their 2014 FIFA World Cup preparation with a test against Bafana Bafana on Tuesday.
As expected, the world and European champions started on the front foot against a team currently 119th in the FIFA World Rankings, and went in front in the 13th minute as home goalkeeper Danilo spilled Juan Mata's cross from the left, allowing Cazorla the chance to tap into an empty net.
The hosts responded in the 36th minute when Bermúdez met a corner with a fierce header which flew past a helpless Pepe Reina. The stadium erupted as the home fans sniffed an upset, but they were silenced two minutes before the interval as Cazorla's powerful cross from the right was palmed into the path of Juanfran and the Club Atlético de Madrid man thumped his shot into the net.
Half-time substitute Fernando Llorente just failed to turn past Danilo shortly after the restart as Spain continued to dominate, but they failed to add to their tally as they eased to the win.