Portugal Under-21s will not match the feat of the senior side at the European Championship despite Friday's 4-2 Group C win over Macedonia, while Spain maintained their perfect record.
Rui Jorge's side needed one more goal to qualify as the best-performing second-placed team, but fell short in Poland.
It means they will be unable to mirror the achievement of Cristiano Ronaldo and Co. following their success in France last year.
Portugal were ahead inside two minutes through Edgar Ie, while Bruma struck to make it 2-0 before Enis Bardhi reduced the arrears.
Daniel Podence restored Portugal's advantage and, after Kire Markoski hit back for Macedonia, new RB Leipzig signing Bruma doubled his tally late on.
It proved too little too late and in the frustration there was a stoppage-time red card for Diogo Jota.
Neighbours and tournament favourites Spain suffered no such woe as Barcelona's Denis Suarez settled their 1-0 win over 10-man Serbia to make it three wins from three in the same group.
Spain had already thrashed Macedonia 5-0 and downed Portugal 3-1.