A goal deep into injury time from Sean Scannell earned Crystal Palace victory over Barnsley, moving them to within six points of the top six.
The visitors started brightly, Julian Speroni saving well from both Matt Done and Andy Gray.
Craig Davies also went close for Keith Hill's side, while Palace's best chance fell for Scannell.
He then grabbed the only goal when Kagisho Dikgacoi picked him out at the back post to head home the winner.
Barnsley's eighth defeat in nine games leaves them in 18th place, but 12 points clear of the bottom three.
Palace on the other hand are 11th, six points behind Birmingham City who occupy the final play-off place.
Crystal Palace manager Dougie Freedman
"It may be one step too far but these players have a never-say-die attitude.
"We're unbeaten in 10 now so we're not a team that lies down so anything is possible. It just shows what resilience we have got.
"The belief that we showed to keep on going when the performance wasn't at its best is why we are doing so well this year. On the night Barnsley had all the possession but we've ended up with the points."
Barnsley manager Keith Hill:
"I'm devastated. I don't know what I have done to deserve this kind of misfortune. The performance was brave but to concede a goal so late is unbelievable.
"The players are hurting and I'm hurting because 0-0 would have been a fair result. We played good football up to the final third but I'm just numb.
"I can't ask any more from the players but we just have to accept that things aren't going our way at the moment."
This page is best viewed in an up-to-date web browser with style sheets (CSS) enabled. While you will be able to view the content of this page in your current browser, you will not be able to get the full visual experience. Please consider upgrading your browser software or enabling style sheets (CSS) if you are able to do so.