Match ends, Birmingham City 1, Swansea City 0.
Birmingham City snatched a huge win in their fight for Championship survival as Scott Hogan's injury-time penalty further damaged Swansea City's fading hopes of automatic promotion.
Blues had missed a first-half spot kick when Lukas Jutkiewicz blasted straight at Swansea goalkeeper Freddie Woodman.
Swans substitute Yan Dhanda had a free-kick saved by Neil Etheridge.
But Dhanda then brought down Ivan Sunjic, and Hogan punished him with an emphatically taken penalty.
Victory moves Birmingham up to 20th in the table, six points clear of the bottom three, albeit having played four games more than Rotherham United, the highest-placed of the teams in the relegation zone.
As for Swansea, a third successive defeat leaves them nine points adrift of second-placed Watford.
Even with a game in hand on the Hornets, the Swans are losing ground in the race for promotion and look increasingly like they will be in the play-offs for a second successive season.
It is now three matches without a goal for the Welsh club and they rarely looked like ending that rut at St Andrew's.
Swansea actually started reasonably brightly and crafted the first chance of the match as Connor Roberts curled a low free-kick into the Birmingham penalty area for Jamal Lowe, whose powerful shot was pushed over the bar by Etheridge.
But that was about as creative as the visitors got, struggling to get the ball into attacking positions against their rugged opponents.
Birmingham were direct, looking to pin Swansea back with long balls into their box and putting them under pressure from set-pieces.
One such dead-ball situation led to their first penalty as Roberts tried to clear but only managed to kick the bottom of Jonathan Leko's foot.
Referee Tony Harrington pointed to the spot, only for Jutkiewicz to ram his penalty down the middle of the goal, where Woodman stood still and parried the ball away.
It was a significant miss in the battle for Championship survival and, in terms of this encounter, it was the last shot on target until the final quarter of an hour.
Swansea substitute Dhanda struck a free-kick fiercely from 25 yards but it was comfortably saved by Etheridge.
Dhanda's next involvement proved to be decisive - but at the other end.
With Sunjic running into the Swansea box, Dhanda appeared to slip as he brought down the Birmingham midfielder and Harrington had no doubts in awarding the penalty.
This time, with the game into added time and tension rising, Hogan took responsibility and fired an excellent penalty to Woodman's right.
That secured Birmingham's second win in three matches under new manager Lee Bowyer, a significant boost in their battle to avoid relegation.
And for Swansea, for whom a draw was no real use, a third successive defeat was another heavy blow to their fading hopes of automatic promotion.
Birmingham City manager Lee Bowyer said:
"There's a long way to go and a lot of points to play for. The most pleasing thing for me is that we're here again at home and got another win.
"It was a fully deserved win I feel against another good side, so it's good to put some points on the board with our home form.
"The work rate from the lads was outstanding, the press was very good and we forced them to go long most of the time, and when they did try and play we pressed and won the ball high.
"With the second penalty you're thinking, 'not again, please', but Scotty stepped up and he had the bottle to take it and thankfully he scored."
Swansea City head coach Steve Cooper:
"That wasn't a good version of us - we're a much better team than that.
"The result is the most disappointing but the performance is right up there in terms of disappointment, because we didn't play anywhere near the level we can play in so many ways.
"I'm not saying we got what we deserved but we have certainly got to play better going forward, that's for sure. We weren't good. We've just not played well enough.
"It's important that we don't panic, we stick together, I lead well and we remain focused because everything's still there to play for."
- 20GardnerSubstituted forHarperat 90'minutes
- 42SeddonBooked at 45minsSubstituted forFriendat 45'minutes
- 35HalilovicSubstituted forToralat 68'minutes
- 10JutkiewiczSubstituted forCosgroveat 82'minutes
- 14LekoSubstituted forHoganat 82'minutes
- 19San José
- 26NaughtonSubstituted forWhittakerat 90+2'minutes
- 7SmithSubstituted forDhandaat 70'minutes
- 10A Ayew
- 9LoweSubstituted forRoutledgeat 88'minutes
- Tony Harrington
- Shots on Target
Second Half ends, Birmingham City 1, Swansea City 0.
Offside, Swansea City. Morgan Whittaker tries a through ball, but Wayne Routledge is caught offside.
Offside, Birmingham City. Maxime Colin tries a through ball, but Sam Cosgrove is caught offside.
Substitution, Swansea City. Morgan Whittaker replaces Kyle Naughton.
Goal! Birmingham City 1, Swansea City 0. Scott Hogan (Birmingham City) converts the penalty with a right footed shot to the bottom left corner.
Penalty conceded by Yan Dhanda (Swansea City) after a foul in the penalty area.
Penalty Birmingham City. Ivan Sunjic draws a foul in the penalty area.
Attempt saved. Harlee Dean (Birmingham City) header from the centre of the box is saved in the centre of the goal. Assisted by Marc Roberts with a cross.
Substitution, Birmingham City. Rekeem Harper replaces Gary Gardner.
Offside, Swansea City. Connor Roberts tries a through ball, but Wayne Routledge is caught offside.
Substitution, Swansea City. Wayne Routledge replaces Jamal Lowe.
Corner, Swansea City. Conceded by Harlee Dean.
Jay Fulton (Swansea City) wins a free kick in the defensive half.
Foul by Sam Cosgrove (Birmingham City).
Offside, Birmingham City. Neil Etheridge tries a through ball, but Sam Cosgrove is caught offside.
Substitution, Birmingham City. Sam Cosgrove replaces Lukas Jutkiewicz.
Substitution, Birmingham City. Scott Hogan replaces Jonathan Leko.
Foul by Jamal Lowe (Swansea City).
Neil Etheridge (Birmingham City) wins a free kick in the defensive half.
- Dragons' Den returns: A new series of eager entrepreneurs hoping to strike the deal of a lifetime
- Your film night sorted: Epic films for you to choose from this Easter weekend