Vicente Del Bosque's 19-man squad was utilized to full effect as the world champions seal an easy win in Central America
Vicente Del Bosque's side travelled to Panama having saw their 24-match qualification winning run come to an end against Didier Deschamp's side in their previous match, but a match against the Central American nation was just what the doctor ordered as they put in a dominant display.
The world champions settled into the match very early, with their intricate passing in the centre of midfield allowing them to dominate possession.
The first true threat to the home goal came through David Villa. The Barcelona forward picked up the ball just outside the area and powered a shot towards the top right corner but the attempt narrowly cleared the crossbar.
Spain didn't have to wait too long to open their account, however, and recorded their opening goal 16 minutes in. Andres Iniesta showed guile outside the box to draw in the tackles of defenders before slipping a pass through the middle for Pedro, who clinically finished into the bottom right corner.
Panama did well to keep Spain at bay for the next 15 minutes or so, but they were undone again half-an-hour into the match thanks to another moment of magic from Iniesta. The maestro glided past four challenges before putting the ball on a plate for Villa who showed composure to side-foot the ball into the top right corner.
Gabriel Torres was Panama's main attacking threat in the first half, and held the ball up well with whatever fleeting moments of possession he had, but he was ultimately crowded out and frustrated in the Spain half.
Spain looked to be enjoying the match, with moments of flair from the frontline sprinkled throughout. Pedro got in on the act again and grabbed his second goal just before half-time when he feigned to pass to Villa after receiving a defence-splitting pass from Mata. The 25-year-old had duped Panama goalkeeper Jaime Penedo to diving for the ball, thus allowing him to pass into the empty net.
The home side managed to up their game after the break, with more pace and intensity injected into their play. Spain were given a scare on the hour mark when Rolando Escobar and Carlos Rodriguez linked up excellently down the right-hand side and took the ball into the box. A shot on goal looked likely but the visitors managed to scramble clear.
Roberto Soldado, a half-time substitute, looked a massive threat towards Panama after he came on and was unlucky not to score with a pair of chances just after the hour mark. He saw a powerful effort superbly saved by Penedo and lashed a shot just wide of the post.
La Roja came within inches of extending their lead in the 68thminute when substitute Jesus Navas picked up a Soldado cross to the back post and hit a snapshot towards goal, only to see his attempt crash off the post.
Spain debutant Markel Susaeta then let Panama off the hook ten minutes later when he picked up the ball after a lovely move involving Cesc Fabregas and Navas. The Athletic man had the goal at his mercy but somehow missed the target.
Sergio Ramos sealed the victory for Vicente Del Bosque's side eight minutes from time when he curled a fantastic free kick into the top corner to make it 4-0.
The rout was completed two minutes later when Susaeta latched on to a Navas cross into the centre to easily tap home for a dream debut goal.
However, Panama City would be allowed the chance to erupt in cheers. The hosts were awarded a penalty in the closing stages when Fabregas brought down Barahona inside the area. Gomez stepped up to dispatch the penalty and send the crowd wild.
The omission of a clean-sheet aside, Spain will ultimately be happy with their result and the performance that went with it. A goal against the World and European champions is certainly a proud moment for Panama.