Charlton withstood a furious late onslaught at The Valley to claim a precious 2-1 win over Sky Bet Championship relegation rivals Barnsley.
But Cauley Woodrow pulled a goal back after 72 minutes, sparking belief that the visitors could find a leveller and keep Charlton within six points of them in the fight for survival.
A brilliant save from Dillon Phillips preserved the home side's lead in the 22nd minute as Barnsley looked to respond in kind from their own free-kick.
Alex Mowatt's floated ball was met firmly by the head of Mads Andersen, who watched on in amazement as Phillips plunged to his right to claw the ball away from the bottom corner.
The ball squirmed out to Halme, who lifted his follow-up shot against the outside of the post.
While Charlton looked largely in control, they contributed to occasional moments of comic panic, most notably when Cullen and Alfie Doughty tried to be too clever with a 43rd-minute free-kick, gave possession away and saw Barnsley set off on a counter-attack only for Jacob Brown to sky his shot at the end of the move.
The half ended as it had begun, with Charlton scoring from a free-kick. This time Doughty chose the obvious option of clipping the ball across. Pearce headed it down once more and, after Naby Sarr had swung and missed, the ball ran kindly for Green to sweep gleefully home the second goal of his loan spell from Aston Villa.
If it seemed as though the result was set, it took Barnsley less than eight minutes of the second half to offer a reminder of their threat.
Andersen's shot from outside the area swerved in the air and forced Phillips to block uncomfortably with his forearm. The ball ran out to Woodrow, whose connection was true but sent it crashing against the Charlton post.
Cullen sent a diving header wide of the post at the other end before Woodrow made it 2-1 with 19 minutes remaining, profiting from Luke Thomas' surging run to rifle the ball into the far corner.
The visitors could not find an equaliser, however, as they suffered a heavy blow to their fight against relegation.