© Getty Images
The home side had a fine chance to open the scoring inside the first five minutes when Artem Kravets drilled an effort into the back-post area, which Andriy Yarmolenko could not quite direct goalwards.
A much-changed Spain side, which included just one survivor from last time out in Cesc Fabregas, could themselves have taken the lead soon after when Fabregas - on his 100th international appearance - fired over when placed under some pressure.
All the onus was very much on the hosts to keep their automatic qualification hopes alive, and they would have done if it were not for David de Gea's fine double stop to keep out Kravets and Ruslan Rotan in quick succession.
It was Spain who pushed on and opened the scoring, though, thanks to debutant Gaspar who headed home Thiago Alcantara's back-post cross.
Fabregas had a great chance to double his side's advantage just a couple of minutes later from the spot after being brought down, but he failed to get the better of Andriy Pyatov in front of watching Chelsea manager Jose Mourinho.
© Getty Images
Denys Garmash and Kravets both had chances to level things up prior to the break, yet the Yellow-Blue struggled to find a way through and headed into the interval a goal behind.
Still Ukraine pushed for a leveller, with Yarmolenko's trickery inside the box in particular proving a threat, but he failed to find a way through before Isco was denied up the other end.
San Jose thought he had put the reigning European champions in control when rifling into the roof of the net 10 minutes into the second half, yet Nacho's earlier lunge on Yarmolenko saw the goal ruled out.
The entertaining affair continued to provide chances, as De Gea kept out a Garmash header before Yarmolenko's inviting cross fizzed through the box.
Having led 3-0 at one stage, news filtered through in Kiev that Slovakia now led Luxembourg by just a single goal elsewhere, meaning hope was still very much alive heading into the final quarter of the match.
Ukraine still needed to win in order to complete their part of the bargain, however, which looked all the more unlikely following a sloppy period of play in the game from both sides.
Ukraine must now contest a playoff in order to keep alive their ambition of reaching next year's finals in France.