JOSE Morais secured his first victory as Barnsley manager thanks to Oli McBurnie's superb double.
The Reds turned on the style in the first half before eventually notching a deserved win against one of their main drop rivals.
There was plenty of drama inside the opening 20 minutes at St Andrews.
The Reds opened encouragingly, with Kieffer Moore nodding just wide and full-back Zeki Fryers firing in a 25-yard strike which whistled narrowly over the crossbar.
The Blues responded in kind, and Barnsley 'keeper Nick Townsend produced a breath-taking double-save to deny Jeremie Boga and then Sam Gallagher.
The Reds surged into the lead after 13 minutes when McBurnie superbly volleyed home a cross from Mamadou Thiam.
Five minutes later the visitors fluffed a golden opportunity to double their lead.
After Reds old boy Marc Roberts had upended McBurnie in the box, the Barnsley goalscorer saw his resultant penalty kick saved brilliantly by David Stockdale.
McBurnie did get his second goal nine minutes before the break, stabbing home from close range as he darted in to convert after Moore's goal-bound header wasn't cleared.
The Blues opened the second period with renewed impetus, and Boga went close to halving the deficit.
However, the visitors saw off a spell of pressure and Moore almost made it three when his glancing header flashed just past the post.
Liam Lindsay came to Barnsley's rescue on the hour mark when his goal-line clearance somehow kept out Che Adams' effort.
Birmingham (4-4-2): Stockdale; Jenkinson (Bramall, 83), Roberts, Dean, Colin; Gardner, Ndoye (Jota, 66), Boga, Adams; Maghoma, Gallagher.
Subs not used: Trueman, Morrison, Dacres-Cogley, Lowe, Jutkiewicz.
Barnsley (4-3-3): Townsend; Yiadom, Jackson, Lindsay, Fryers; Potts, Gardner (Pearson, 86), Williams; Thiam (Mahoney, 60), Moore, McBurnie (Knasmullner, 79).
Subs not used: Davies, Cavare, Moncur, Bradshaw.
Referee: Jeremy Simpson (Lancashire).