Arkadiusz Milik converted a twice-taken penalty as Poland came from behind to draw 1-1 with 10-man Portugal in the UEFA Nations League.
Poland were already relegated from Group 3 but, after Andre Silva scored his second goal in four games to give Portugal a first-half lead, Milik's equaliser ensured Jerzy Brzeczek's side a share of the points and a place in Euro 2020 qualifying draw pot 1 at the expense of Germany.
Portugal, who clinched a place in the Nations League finals with a goalless draw against Italy on Sunday, put in an improved display but Poland's physical approach to the game helped them muscle their way back into the contest after the break.
Danilo Pereira felled Milik in the box in the 62nd minute and was shown a red card, with the striker scoring from the spot on two occasions, his initial attempt having been ruled out due to encroachment.
Renato Sanches was Portugal's most dangerous attacking outlet and it was his corner that was converted by Silva, whose flicked effort caught Wojciech Szczesny out to reach the net.
Poland almost hit back within minutes when Tomasz Kedziora crashed a looping header onto the crossbar, but Portugal led at the break.
The second half was played at a faster pace and swung from end to end before Poland found a response just after the hour mark.
Danilo reached his arm across Milik's back as the Napoli forward bore down on goal and referee Sergey Karasev had no hesitation in sending off the Porto player, though the hosts held out for a draw after conceding from the spot.
What does it mean? Both sides satisfied
Portugal remain unbeaten in their last six games and will be confident of improving when Bernardo Silva returns from injury, while Poland will be delighted to have potentially eased their path to Euro 2020.
Sanches steps up
In the absence of Silva and Cristiano Ronaldo, Sanches was Portugal's attacking catalyst and the man once dubbed the nation's great hope appears to be back on track.
Danilo should know better
Placing an arm on a striker as they prepare to shoot is only ever going to produce one outcome, and the experienced Danilo can hardly have been surprised when Milik tumbled to the ground.
Portugal can look forward to the Nations League finals on home turf in 2019 while Poland's attention now turns to qualifying for Euro 2020.