© Getty Images
The hosts needed less than two minutes to double their advantage as Juanfran crossed the ball in for Paco Alcacer, who was making his first appearance in a competitive international for Spain, leaving him with a simple tap-in from close range.
The defending European champions pushed hard to restore the two-goal cushion before the break, but Tome Pacovski made a couple of solid saves to deny Alcacer and Pedro, while Daniel Mojsov blocked a Silva effort.
However, the home side did manage to find a third in stoppage time just before the half-time whistle as a Sergio Busquets effort was deflected into the back of the net.
Spain continued to press at the start of the second half and were able to increase their lead within five minutes as Jordi Alba played the ball in for Silva to drill the ball in low.
Alba was involved again later in the half as Cesc Fabregas tried to add Spain's fifth, only to see his shot kept out by the crossbar.
Pedro also had a chance to make it five as he jumped to meet a Juanfran cross, but the striker headed the ball just wide.
The Barcelona youngster provided a burst of pace in the closing moments, but it was Pedro who had the final say, chipping the ball in during stoppage time to complete an emphatic win.