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 in Sevilla on Friday night.
Against a Bolivia side ranked 68th in the world, Spain was not expected to face many problems. And that proved to be the case as Vicente Del Bosque's men cruised to victory without ever reaching top gear, ahead of the defense of their FIFA World Cup crown.
Spain predictably dominated possession, but was frustrated for large periods by a Bolivia outfit content to sit behind the ball and commit cynical fouls when needed.
Pep Guardiola had opened the scoring with a penalty in the sides' only previous meeting, which saw Spain run out 3-1 winners in the 1994 World Cup.
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 was 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 Spain 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 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 halftime substitute for Juan 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 the World Cup defense begins in earnest.