Josh Brownhill scored a stoppage-time winner as Bristol City came from behind to beat Charlton 2-1 in a Sky Bet Championship thriller at Ashton Gate.
The midfielder raced on to a long ball down the middle before firing past Dillon Phillips in the eighth minute of added time to secure all three points for the 10-man hosts.
The visitors had taken a 65th-minute lead when City goalkeeper Dan Bentley unwisely advanced to the corner of his penalty area only to be beaten to the ball by Macauley Bonne, who coolly slotted into an empty net.
Substitute Famara Diedhiou levelled 10 minutes later, but he was then shown an 86th-minute red card for taking a swipe at Jason Pearce following a challenge on him by the centre-back.
A low-key first half was most notable for Charlton losing Sam Field and Jake Forster-Caskey to injury.
Field hurt himself fouling Antoine Semenyo in the 32nd minute and had to be carried off on a stretcher after lengthy treatment, while Forster-Caskey followed four minutes later, going down inside his own box and being helped from the pitch.
Andreas Weimann squandered the best chance of the half for City when mistiming his header after rising unmarked to meet a Pedro Pereira cross and sending the ball harmlessly wide.
Charlton began the second half brightly and came within inches of taking a 52nd-minute lead when Bonne fizzed a shot wide after breaking clear on the left.
City head coach Lee Johnson had seen enough and sent on recent signing Rodri for his home debut in place of Niclas Eliasson.
Still the visitors pressed and Bentley had to make his first save, tipping over Beram Kayal’s shot from 25 yards. Then the goalkeeper had to advance bravely from his line to deny Conor Gallagher.
Bonne had a shot blocked as Charlton piled on the pressure, but City almost caught them with a swift break that ended with Weimann’s close-range shot brilliantly deflected over by Phillips.
Then came Bentley’s error and Bonne’s goal, which was no more than the visitors deserved.
Bentley had to atone two minutes later, denying the goalscorer after a mistake by Taylor Moore.
Suddenly both defences were being opened up at will. Brownhill’s effort from distance brought another fine save from Phillips while at the other end Bentley had to dive full length to keep out Darren Pratley’s volley from distance.
Diedhiou’s equaliser came with City on top for the first time, with the substitute nodding home from close range after fellow replacement Rodri had headed on a right-wing cross.
It was end-to-end stuff as both teams searched for a winner before Diedhiou’s lash out at Pearce brought a melee involving 15 players.
Referee James Linington waited for calm, consulted an assistant, and then sent Diedhiou to the dressing room, but the drama was not finished as Brownhill scored a dramatic winner for the 10 men.