Poland secured automatic qualification for Euro 2016 as Robert Lewandowski's 13th goal in Group D sealed a 2-1 win over the Republic of Ireland, who finished with 10 men.
Grzegorz Krychowiak's fine strike gave Poland the lead, but Martin O'Neill's men hit back less than three minutes later through a Jon Walters penalty.
Lewandowski proved Poland's hero once again, however, heading home to equal the tournament goalscoring record set by Northern Ireland's David Healy back in Euro 2008 qualifying.
Ireland brought on Robbie Keane and Aiden McGeady as they pushed for an equaliser in the second half, but it was Richard Keogh who spurned their best chance to level the match in the closing minutes.
Poland ultimately held firm to secure second spot in the group, a point behind Germany, while O'Neill's side – who had John O'Shea dismissed for a second booking in stoppage time – must wait to discover who they will meet in the play-offs.
The first half started in understandably nervy fashion, but Poland took the lead through a moment of real quality.
Kamil Grosicki aimed a corner to Krychowiak on the edge of the area and the Sevilla midfielder took a touch before rifling a half-volley through the crowd and into the bottom-right corner.
The home side's lead lasted barely three minutes, however, as Michal Pazdan caught Shane Long with a high foot right on the edge of the box, allowing Walters to stroke home a confident penalty.
Poland were unhappy to see the spot-kick awarded as contact looked to have taken place outside the area and the boos rang out again a few moments later as Krzysztof Maczynski's goal was ruled out for offside.
Lewandowski was marshalled well throughout the first 40 minutes, but the captain was ruthless with the first chance that came his way, powering a header past Darren Randolph from 12 yards just before the break after a good cross from Maczynski.
Ireland were dealt a blow shortly after the break when Long was taken off on a stretcher following a robust challenge from Kamil Glik and Randolph kept them in the game with a strong close-range block as Krychowiak broke through on the counter-attack.
O'Neill's side continued to push forward for an equaliser as Poland began to drop deeper, but another quick burst forward gave Lewandowski a sight of goal only for Seamus Coleman to cover his run superbly.
Chances were few and far between for Ireland, but Keogh should really have done better with just nine minutes to go, as he failed to connect properly with a point-blank header and the impressive Lukasz Fabianski made a smart save.
Ireland kept pressing, but their momentum was stalled when O'Shea got his marching orders for bringing down Lewandowski as he looked to break clear.
The defender and Walters – who was booked – are now set to miss the first leg of their play-off as O'Neill's men will be forced to do it the hard way.