Spain's Under-21 side will play Denmark in the play-offs for a place at the 2013 European Championships in Israel.
Julen Lopetegui's side were paired with the Danes when the draw took place in Nyon earlier today.
The two-legged play-off will start on October 12 and conclude four days later.
La Roja finished top of their qualifying group, five points ahead of second place Switzerland, whilst Denmark finished two points behind leaders Serbia in their section.
The seven play-off winners will advance to the finals in Israel, where Spain will be hoping to defend the title they won in 2011.