Bradford skipper Michael Flynn missed a match-saving injury-time penalty as Rotherham claimed a tense derby win.
Lewis Grabban shot the Millers ahead from the spot when Luke O'Brien handled Brett Williams' cross, City equalising through a Chris Mitchell header.
Alex Revell's low shot restored the Millers' lead before Marcus Marshall latched onto a rebound to make it 3-1.
But Bradford could not cash in on their two late penalties, Flynn scoring the first, only to have the second saved.
In a game of three spot-kicks, Cheshire referee Mark Heywood awarded Bradford's first penalty in the last minute after Jason Taylor handled and Flynn duly scored from 12 yards
But, when Bradford were then awarded a second penalty deep into stoppage time after substitute Tom Newey was also penalised for handball, visiting keeper Conrad Logan dived to save the Bantams captain's under-hit effort.
VIEWS FROM THE DRESSING ROOM
Rotherham boss Andy Scott told BBC Radio Sheffield:
"Difficult to describe how I'm feeling. We were terrific all day and thoroughly deserved to be 3-1 ahead going in to the final minute.
"We keep saying it, keep working hard and it comes good.
"Everyone is going to talk about the last minute penalty save but we were by far the better side."