Two goals from Bartosz Bosacki handed Poland a 2-1 victory over Costa Rica and ensured they avoided the wooden spoon in World Cup Group A.
Under-pressure Poland coach Pawel Janas finally saw his side show some fighting spirit as they came from behind to condemn Los Ticos to bottom spot.
Costa Rica were the first to threaten and Paulo Wanchope tried a shot from distance after five minutes but his effort bounced into the arms of Artur Boruc.
Ronald Gomez then tried his luck with a free-kick from 35 yards and saw it cannon off defender Bosacki to safety before he did give Costa Rica the lead with another free-kick on 24 minutes.
Boruc would not be happy with his contribution as Gomez drove the ball through the wall and straight under his legs into the net.
Poland hit back and Ireneusz Jelen missed a great chance before they did find an equaliser in the 33rd minute when Bosacki scored from close range, with Costa Rica keeper Jose Porras hopelessly out of position.
It was just the boost Poland needed and Maciej Zurawski raced forward in the 43rd minute only for his effort to be blocked by Gabriel Badilla.
They continued to improve after the break and missed a number of decent opportunites before Bosacki grabbed his second after 66 minutes.
Jacek Krzynowek unleashed a piledriver from 20 yards and Porras did well to push the ball out for a corner.
However, Krzynowek was not to be denied and it was from his corner that Bosacki powered home a header to hand his side the lead.
Gomez had the best chance to get his side back into the game with another free-kick 10 minutes from time, but this time it was poor and Poland held on for the three points.