GOALS from Kieffer Moore and Oli McBurnie earned Barnsley a precious survival lifeline as they ended Brentford's play-off quest with a memorable victory.
Staring down the barrel on a day when they could have been relegated if they had lost and Bolton Wanderers had triumphed at Burton Albion, the Reds held their nerve in exemplary fashion to producing arguably their best home performance of the season at the perfect juncture.
The win moved the Reds out of the relegation zone on an afternoon when Bolton crashed at the Pirelli Stadium, with all roads now leading to Derby County for Barnsley.
The first delicious moment in a fine afternoon arrived on 11 minutes when Moore's crossshotflew over Bees keeper Daniel Bentley to go in off the post in a sweet and relieving moment from the Reds.
The Reds' fighting spirit in the first period was far removed from their meek efforts at Nottingham Forest in midweek, with Moore almost adding a second when he headed wide under pressure after an inviting centre from Conor Mahoney.
Despite going behind, the Bees refused to panic and enjoyed their fair share of possession and posing a threat going forward.
Jack Walton, making his home debut, saved an early effort from Romaine Sawyers, while it took an immaculate saving challenge from Liam Lindsay just after the half-hour mark to deny Ollie Watkins.
Ethan Pinnock, one of four changes in the home line-up, also made a fine saving block to divert a goalbound effort from Sergi Canos.
The interval scoreline at Burton - with Bolton trailing 2-0 - also added to the hosts' well-being, but more importantly, they continued to produce a performance of heart, character and commitment, with plenty of tempo, backed by a raucous Pontefract Road end.
It yielded a huge second half six minutes after the interval with referee Darren Bond adjudging that McBurnie's downward header had crossed the line following Hammill's deep corner - and despite the ball being cleared, a goal was awarded.
The goal visibly deflated the visitors, with the Reds going for the throat.
Moore missed a golden chance to make the game safe, somehow skying the ball over with the goal at his mercy after Bentley parried Mahoney's shot straight into his path.
The big striker's radar was again when he drills a shot just wide after fine work by the tenacious Hammill, who had robbed substitute Nicholas Yennaris.
The hosts were winning all the key battles with Hammill soon firing wide before a good free-kick chance was spurned at the other end by Florian Jozefzoon after the hitherto immaculate Lindsay.
But it was Barnsley's day as they provided themselves with a lifeline in their quest to stave off the drop.
Morais said: "I'm very proud of the team. The way we performed today was something that I was expecting, but much more times than it in fact did happen here.
"We deserved more times than just the two times we won at home while I have been here.
"I am happy for the boys, happy for the club and happy for the fans because these players wanted to reward the fans with a win in our last game here.
"I think they always wanted it. I know the effort they are putting in, the will they have and I know the quality they have.
"For some reason, in some moments, things just don't come out. But I believed the seeds were there and one day they will come out - today was one of those days."
Barnsley: Walton; Yiadom, Pinnock, Lindsay, Fryers; Gardner; Mahoney (Thiam 87), Potts, Hammill (Moncur 90); McBurnie (Cavare 90); Moore. Substitutes unused: Davies, Bradshaw, Mallan, Pearson.
Brentford: Bentley; Dalsgaard; Egan, Mepham, Barbet; Woods; Josefzoon, MacLeod (Yennaris 59), Sawyers (Mokotjo 73), Canos (Maupay 59); Watkins. Substitutes unused: Daniels, Bjelland, McEachran, Judge.
Referee: D Bond (Lancashire).