James Morrison scored a last-gasp equaliser to deny Bristol City a famous FA Cup third-round win as they drew 2-2 with West Brom at The Hawthorns.
Saido Berahino - who was described as being lucky to be on the bench by head coach Tony Pulis after being left out of the starting line-up against Newcastle United last month - opened the scoring with a low strike in the 67th minute.
Berahino went over to shake Pulis' hand after his goal but West Brom's celebrations were cut short as Championship strugglers City levelled just seven minutes later through Jonathan Kodjia.
Kodjia headed home from Luke Freeman's free-kick and West Brom appeared set for a shock exit when City completed the turnaround.
Freeman was involved again as his shot proved too hot for Ben Foster - making his first appearance since last March following a knee ligament injury - and Kieran Agard was there to convert the rebound.
Yet there was a final twist in the tale in the 95th minute, Morrison turning home from Jonny Evans' header back across goal with the last meaningful kick of the game.
City were the first to test either goalkeeper as Joe Bryan forced Foster into action with a curling effort in the 10th minute.
It was West Brom who unsurprisingly enjoyed the majority of the possession, but the hosts struggled to create goalscoring opportunities.
Frank Fielding parried a long-range effort from James McClean, which served as West Brom's best opportunity until Salomon Rondon headed wide in the 38th minute.
Morrison spurned another opportunity shortly before half-time, with the visitors making an unexpected change following the interval.
The Robins brought on 19-year-old goalkeeper Max O'Leary for his debut in place of Fielding before the start of the second half.
Rondon then wasted a golden opportunity in the 55th minute as he was put through on goal only to fire wide of the left-hand post.
West Brom were fortunate not to fall behind shortly after, Kodjia hitting the side-netting following good work from midfielder Korey Smith.
And they were made to pay as Berahino put West Brom ahead by curling beyond the reach of O'Leary.
However, City responded superbly and restored parity courtesy of Kodjia's header from Freeman's deft delivery.
Kodjia was then replaced by Agard and the substitute popped up inside the six-yard box to pounce and seemingly seal a memorable triumph for Steve Cotterill's side.
But City - third bottom in the Championship - could not hold out, allowing Morrison to convert after Evans had nodded Callum McManaman's ball in towards the midfielder.
Get the best features, fun and footballing frolics straight to your inbox every week.
Thank you for signing up to Four Four Two. You will receive a verification email shortly.
There was a problem. Please refresh the page and try again.