Jeremie Bela went from villain to hero in a tale of two late penalties as Birmingham drew 1-1 against Rotherham at St Andrew's.
The Angolan winger calmly converted from the spot in the 90th minute - just three minutes after fouling to concede for Kieran Sadlier's successful spot-kick for Rotherham.
Blues dominated after the first 20 minutes but could not make their numerous chances count.
Lukas Jutkiewicz, who is yet to open his account this season, had three chances, Harlee Dean had a header disallowed, Ivan Sanchez was denied twice and Bela fired wide.
Rotherham started brightly with what appeared to be a shoot-on-sight policy.
Angus MacDonald forced goalkeeper Neil Etheridge into a fingertip save with a first-time, low drive from just outside the box.
Then Mickel Miller drilled narrowly wide from an angle before curling an inswinging free-kick that Etheridge had to tip over.
Up to this point, Blues' only foray forward was a tame, sidefooted effort from Ivan Sunjic blocked by Chiedozie Ogbene.
Miller was looking like the dangerman for Rotherham and he should have punished Blues as they backed off when he ran at them, but he could only produce a poor shot that trickled wide.
Blues went close to the opening goal in the 21st minute, and for long periods after that were the better side.
New signing Scott Hogan crossed for Jutkiewicz, whose attempted backheel was cleared by Michael Ihiekwe.
Blues had the ball in the net on the half hour but Dean's powerful header from Bela's free-kick was ruled offside.
Rotherham went agonisingly close to taking the lead in the 38th minute. Ogbene's angled shot came off Dean's foot and the ball looped up before dropping just over the bar.
Blues had two chances just before half-time to make the breakthrough.
Jutkiewicz volleyed wide of an open goal after Hogan charged down goalkeeper Jamal Blackman.
Then Sanchez's curling free-kick from the edge of the box forced Blackman to tip wide.
Blues had the first chance of the second half when Sanchez let fly with a 25-yard drive but his effort was held by Blackman.
They followed that up with a chance for Bela, who cut in from the left and curled inches over from 20 yards.
Rotherham gave Blues a scare when substitute Michael Smith rose highest to MacDonald's corner at the far post but his header was blocked by Dean and Etheridge collected.
Almost immediately Blues broke and Jutkiewicz's glancing header produced a superb save from Blackman, whose left hand kept it out of the top corner.
The game burst into life in the last few minutes. Sadlier thumped home into the roof of the net from the spot after Bela tripped Ben Wiles just inside the box.
Soon after, Blues substitute Jon Toral was pushed over on the byline by Billy Jones and Bela calmly curled his penalty low to Blackman's left.
What the managers said...
Birmingham's Aitor Karanka: "[Bela] showed personality which I think is good. After giving away a penalty, three minutes later, we had a penalty and he was the first one to want to take it. He knew he was responsible and he was happy to take the penalty. He showed us personality and after that, he had a chance to win the game.
"Sometimes you can feel that players such as Harlee (Dean, captain), Kristian (Pedersen) or Ivan (Sunjic) have personality, but today he showed he is one of them. It was a difficult decision even when he knows he's responsible for taking the penalties. Other players would have looked towards the side or would have missed the penalty."
Rotherham's Paul Warne: "They are both penalties. It was disappointing but the one we got, it seemed more of a penalty whereas the one we gave away was a little bit more disappointing because he (Jon Toral) wasn't really going anywhere.
"On the whole I was really proud. We didn't come here to defend. We came here to try to win and we just didn't do enough. We had a couple of deflected shots which I thought might loop in past their keeper but I obviously didn't rub the right genie this morning!"