There were signs of promise from Stephen Keshi’s young Super Eagles, but their finishing often let them down, and it seemed as if Spain never really got out of third gear.
Jordi Alba opened the scoring early on, finishing off a flowing move by the Spaniards. Alba received a neat pass from his Barcelona clubmate Andreas Iniesta and skipped past three Nigerian defenders, with a lucky rebound along the way, before slotting home.
The Super Eagles caused problems for Spain’s defence in the first half. John Mikel Obi was set up by some good work from Joseph Akpala, but his attempt was thwarted by Sergio Ramos.
Sunday Mba next came close, with build-up play by Ideye Brown, but his stinging effort was edged out by Victor Valdes.
Spain doubled their advantage on the hour mark, when substitute Fernando Torres capitalised on some poor defending to head home two minutes after coming onto the pitch.
Ahmed Musa set up substitute Muhammad Gambo, who somehow managed to hit wide with only the keeper to beat, after his first touch let him down badly.
Alba sealed the win with two minutes to go, rounding Vincent Enyeama after a long pass from David Silva.
Stephen Keshi team will leave Brazil with a solitary win over Tahiti, finishing third in Group B behind Uruguay.
Spain top Group B with nine points, and face Itay in a rematch of last year’s Euro 2012 Final in the semi-final on Thursday.