Alvaro Morata scored the only goal of the game midway through the first-half on his full competitive debut with the senior side after latching onto Koke’s excellent through ball.
Victory moves Spain three points clear of Ukraine in second place in Group C, but they remain three points adrift of Slovakia who were 3-0 winners over Luxembourg on Friday.
“In the first-half we played well and we had chances,” said Spain boss Vicente del Bosque.
“In the second we had a few openings, but we found it difficult to break them down. The second-half left me with a bad taste in my mouth.
A prolific scorer at under-21 level, Morata was given his chance to start in the absence of the injured Diego Costa and should have had his first international goal after just seven minutes when he was released by David Silva, but the Juventus striker pulled his shot wide.
Ukraine were inches away from taking the lead at the other end on 27 minutes when Ruslan Rutan fired wide of the far post.
Seconds later it was Spain who found the net as a brilliant pass from Koke released his former under-21 teammate and Morata’s finish flicked up off Evgeny Khacheridi and over the helpless Andrey Pyatov.
“It wasn’t easy, these opponents are known for defending well and they are very aggressive,” said Morata.
“It wasn’t my best game but I just need to keep working hard to get the chance to come back and play again.”
The hosts were unlucky not to be further in front at the break when Sergio Ramos sent a header crashing off the bar from Silva’s free-kick.
However, it was the visitors who enjoyed the better of the chances in the second period.
Iker Casillas’s selection ahead of the in-form David de Gea had been a controversial one, but Spain’s all-time record appearance holder repaid the faith shown in him by Vicente del Bosque with a fine save to turn Rotan’s in-swinging free-kick behind.
Yet, he nearly undid his good work moments later with a terrible clearance straight to Rotan, but the Dnipro Dnipropetrovsk midfielder lacked precision with his finish and a grateful Casillas parried the ball to safety.
Rotan wasted another great chance 25 minutes from time when he was picked out by Andriy Yarmolenko and again placed his shot too close to Casillas.
Morata was replaced by Pedro Rodriguez 25 minutes from time as Del Bosque looked to regain control with another body in midfield.
However, it was another substitute who had the chance to seal all three points when Santi Cazorla combined brilliantly with Isco only to see his curling effort turned behind by Pyatov. – Agence France-Presse