The Barcelona man was at the heart of the majority of Spain's best attacks at the Vicente Calderon, and he was rewarded for a fine performance when he swept home the winner from close-range in the second half.
Italy played their part in an entertaining encounter, but Vicente del Bosque's men were good value for a win that is sure to provide a timely confidence boost as they continue their preparations towards the start of the global showpiece in Brazil.
Spain enjoyed the majority of possession in the first half, though Italy went closest to breaking the deadlock when Alessio Cerci's cross-cum-shot deceived Iker Casillas and hit the post.
David Silva was introduced after the break for the hosts and he was instrumental in several Spain attacks, but it was Pedro who settled the match with his 64th-minute close-range effort.
Del Bosque handed a long-awaited debut to Diego Costa, after the Atletico Madrid man declared his allegiance to the Spanish from the country of his birth, Brazil.
Meanwhile, Cesare Prandelli handed an international debut to Parma centre-back Gabriel Paletta.
In an end-to-end opening, Italy went closest to opening the scoring in fortuitous circumstances on four minutes when Cerci's mis-hit cross from the right hand-side of the box looped over Casillas and rebounded off the far post.
Spain responded in kind when Pedro's low drive from 25 yards was well parried by Gianluigi Buffon.
Pedro was involved again in the 20th minute, the Barcelona forward cutting in from the left before sliding in Costa, whose first-time shot was well blocked by Paletta.
Italian opportunities were proving few and far between, but Pablo Daniel Osvaldo should have done better on the half-hour mark when he collected Claudio Marchisio's neat flick before advancing towards goal and curling a left-footed shot wide.
Spain introduced Xabi Alonso and Silva for the second half, and the duo linked up for the first opportunity after the break on 50 minutes, the former finding the latter on the edge of the box as he in turn slipped the ball to Thiago Alcantara, but the Bayern Munich midfielder was thwarted by Buffon.
Manchester City winger Silva was proving a constant menace to the Italy defence and his throughball found Pedro soon afterwards. His cut-back in turn found Costa, but he could only shoot wide from eight yards.
Spain's relentless second-half pressure finally told just after the hour mark when Silva's attempted one-two with Andres Iniesta fell kindly for Pedro, who squeezed his shot under Buffon - although the Italian may feel he could have done better in keeping the shot out.
With 10 minutes remaining Costa turned in the penalty area, only to screw his shot wide.
Pedro then departed to a warm reception, with his replacement Santi Cazorla driving a shot narrowly over the crossbar in the closing stages.
Get the best features, fun and footballing frolics straight to your inbox every week.
Thank you for signing up to Four Four Two. You will receive a verification email shortly.
There was a problem. Please refresh the page and try again.