Daniel Holmes struck deep into stoppage time to hand 10-man Burton a stunning win over York at the Pirelli Stadium.
Mark Greaves headed the hosts in front, but York stormed into the lead thanks to Martyn Woolford's neat finish and Onome Sodje's strike from 20 yards.
Craig Farrell made it 3-1 from the spot after Aaron Webster had seen red for a professional foul on Richard Brodie.
But Burton stormed back, Shaun Harrad's header and John McGrath's curler making it 3-3 before Holmes's drilled winner.
Burton Albion: Poole, Brayford, Webster, Shaw, Farrell, Corbett, Greaves (Holmes 63), McGrath, Gilroy (Goodfellow 63), Edwards (Harrad 69), Clare.
Subs Not Used: Taylor, Clough.
Sent Off: Webster (51).
Goals: Greaves 26, Harrad 83, McGrath 87, Holmes 90.
York: Evans, Purkiss, McGurk, Jones, Robinson, Farrell (Meechan 70), Panther, Greenwood, Woolford, Sodje (Brayson 64), Brodie (Beardsley 72).
Subs Not Used: Pentney, Hutchinson.
Goals: Woolford 45, Sodje 48, Farrell 52 pen.
Ref: D Richardson (West Yorkshire).