Daniel Nardiello coolly fired Barnsley into the play-offs with a priceless penalty in a hotly-contested clash with relegated Walsall at Bescot.
Barnsley had needed a win to be sure of securing their play-off place but made hard work of it.
They should have been out of sight by half-time but had to wait until eight minutes before full-time to secure their win.
Barnsley had been cruising after Marc Richards gave them a 31st minute lead but were pegged back by Dean Keates' second-half spot-kick.
Walsall, who were playing in front of watching new manager Richard Money for the first time, were reduced to 10 men after the 78th minute dismissal of Ian Roper and at least went down with a fight by collecting four more yellow cards in the final seven minutes of the game.
Walsall appeared determined to do all they could to help Barnsley into the play-offs after a series of errors in the opening 25 minutes.
Goalkeeper Andy Oakes spilled a long range drive from Nardiello and then had to react sharply to beat away the follow-up from Brian Howard.
Nardiello then saw his shot blocked after a mistake by Craig Pead before Richards was denied by a goalline clearance from Anthony Gerrard.
It was inevitable that Walsall's luck would run out eventually and Barnsley finally made a deserved breakthrough when Howard lifted a right-wing free-kick into the area that the unmarked Richards headed home at the far post.
Nardiello then missed two more clear chances to put the result beyond doubt and Walsall made him pay for his failings in front of goal.
Walsall were much more of a threat in the second half and they were rewarded for a spell of pressure in the 57th minute when substitute Daryl Taylor was bundled over by Paul Heckingbottom.
Referee Roger Beeby had no hesitation in awarding a penalty and Keates calmly sent Nick Colgan the wrong way from the spot.
That set the alarm bells ringing for Barnsley and they needed the fingertips of Colgan to keep them on level terms when he tipped away a curling drive from Kevin James.
With so much at stake for Barnsley, tempers started to get frayed and Roper saw red when he collected his second yellow card after a flare-up with Tommy Wright.
The extra manpower was just the break that Barnsley needed and they took full advantage eight minutes from time when Nardiello jinked into the area only to be sent sprawling by Taylor.
Nardiello was nerveless as he calmly slotted home his spot-kick to put Barnsley three games away from the Championship.