The Chelsea forward struck from the penalty spot in Seville before the Barcelona man rounded off a comfortable victory for Vicente Del Bosque's sideGoals from Fernando Torrers and Andres Iniesta gave Spain a 2-0 victory over Bolivia on Friday night.
Against a side ranked 68th in the world, Spain were not expected to face many problems in Seville on Friday.
And that proved to be the case as Vicente Del Bosque's men cruised to victory without ever reaching top gear, ahead of the defence of their World Cup crown.
Spain predictably dominated possession, but were frustrated for large periods by a Bolivia outfit content to sit behind the ball and commit cynical fouls when needed.
Spain threatened as early as the third minute, Juan Mata seeing a goalbound volley blocked after Pedro's darting run and cross from the byline.
Bolivia were happy to drop deep when the hosts attacked, and Torres dragged a shot from distance well wide in the 26th minute as Spain toiled in search of a breakthrough.
Cesar Azpilicueta struck the outside of the right-hand post with a low, curling effort and Pedro tested Romel Quinonez with a rasping drive as the home side continued to dominate.
As the half came to a close, Quinonez had to be alert to tip Mata's free-kick over the crossbar after Santi Cazorla had been felled on the edge of the box.
Spain hit the front six minutes into the second half, Torres calmly sending his spot-kick down the middle after Luis Gutierrez was adjudged to have pushed Javi Martinez inside the area.
The Chelsea man ought to have doubled his tally two minutes later when picked out by a trademark pinpoint pass from Iniesta.
Torres controlled the ball beautifully but then sent an attempted chip high into the stands.
Pedro stung the palms of the goalkeeper for a second time as Spain moved through the gears, while Cesc Fabregas was only denied by a last-ditch challenge by Marvin Bejarano in the 63rd minute.
David Silva, on in place of Cazorla, was next to test Quinonez three minutes later, but his weak effort was comfortably held by the keeper.
Apzilicueta also side-footed a deep cross from Alberto Moreno into the side netting, but Spain's win was wrapped up thanks to Iniesta's curling strike before Sergio Busquets hit the bar with a minute remaining.
Iniesta, on as a half-time substitute for Mata, sealed victory six minutes from time, driving forward into space and bending a precise effort in off the right-hand upright.
Spain will now travel to the United States for a friendly with El Salvador before their World Cup defence begins in earnest.