Lopez scores on debut as Spain sink Serbia
For much of the game, Spain's performance was as disjointed as their tournament preparations but a 10-minute spell of inspiration midway through the second half handed Serbia coach Sinisa Mihajlovic a defeat in his first match in charge.
With Spain forward David Villa out of the tournament after failing to recover from a broken leg, Roberto Soldado, Alvaro Negredo and Lopez were all given a chance to show what they could produce.
Lopez, who came on at half-time and was one of five players to make his debut for Spain, made by far the best of his opportunity, scoring within 18 minutes when he headed in a cross by Jesus Navas.
Serbia barely mustered a shot on goal and for the last half hour their large contingent of fans amused themselves by letting off firecrackers, cheering each bang and ignoring orders from the stadium announcer to stop.
One firecracker also landed on the field at the Swiss second division ground and another before the match drowned out the Spanish national anthem.
Spain have spent the last week at Schruns, a mountain resort in Austria, but preparations for their European Championship defence have been somewhat unusual.
Coach Vicente del Bosque named a provisional 21-man squad on May 15, but was forced to go without any players from Barcelona and Athletic Bilbao who were involved in the King's Cup final on Friday.
The Spanish federation had blamed fixture congestion for the late date, extending the domestic season for an extra two weeks.
Del Bosque will name his final 23-man on squad on Sunday when a number of players in action against Serbia will be on their way home to make way for the likes of Xavi, Andres Iniesta, Victor Valdes and Sergio Busquets.
"It's always good to have new players, it gives us more depth to our squad," Del Bosque told reporters. "Adrian did very well, as did the rest of the players.
"We've more or less decided on the 23. We'll try to be fair when we make the decision."
Spain started with Negredo and Soldado in attack but neither made much of an impression.
Negredo had a 25-metre shot well saved by Damir Kahriman in the first minute, but it was all down hill from there.
Despite plenty of running, Cazorla and Navas in midfield failed to create any real openings for the front pair and Soldado, in particular, failed to provide any real movement and was marked out of the game.
Serbia's ultra-cautious tactics did not help but on the one occasion that Navas was given a free run at the defence, he let the ball slip under his foot.
Defensive midfielder Xabi Alonso had two of Spain's best efforts, the first a speculative 60-metre effort which flew just over the bar with Kahirman stranded and the second a 30-metre free-kick that also curled just over.
Dejan Lekic had the ball in the net for Serbia but was ruled offside.
Spain made four half-time substitutions and the entrance of Benat, David Silva and Lopez appeared to galvanise them.
Silva slipped the ball through the Serbian defence and Lopez was centimetres too high with a delicate chip over Kahriman.
Shortly afterwards, Benat sent Navas free down the right with a majestic 50-metre pass and his cross into the middle was headed in by Lopez.
Ten minutes later, Lopez went down under a challenge from Dusko Tosic and Santi Cazorla converted the penalty, taken after Serbian fans behind the goal threw a device on to the pitch which left a huge plume of purple smoke in the area.