Nahki Wells struck a dagger into the heart of former club Huddersfield with a stoppage-time penalty that earned Bristol City a 1-1 Championship draw at Ashton Gate.
When Josh Koroma fired the visitors in front in the 81st minute after a Jack Rudoni shot was deflected into his path, it seemed Huddersfield would lift themselves out of the relegation zone.
But deep into added time Terriers substitute Ollie Turton was judged to have handled a Cameron Pring cross from the right and Wells, formerly a hero with Town fans, sent a powerful spot-kick beyond the reach of goalkeeper Lee Nicholls.
It was rough justice on Huddersfield, who fought hard throughout and edged a forgettable contest.
Injuries to several central defenders, including normal pairing Rob Dickie and Zak Vyner, meant City fielded a makeshift back-three of Ross McCrorie, George Tanner and Pring. Huddersfield welcomed back midfielder Rudoni from injury.
Huddersfield made an encouraging start, but picked up two early bookings as referee Rebecca Welch showed yellow cards to Brodie Spencer and Alex Matos inside the first 12 minutes.
The visitors made all the early running, Rudoni shooting wide and Delano Burgzorg firing over from Sorba Thomas’ cross.
Spencer was also off target with a glancing header and City’s new-look back-line appeared vulnerable.
Having demolished Blackburn 5-0 in midweek, the home side were unable to mount any serious attacking threat and a Koroma shot was deflected behind for a corner as Huddersfield continued to bely their lowly league position.
The half-time whistle went without City having registered a goal attempt of any sort, but Huddersfield had failed to capitalise on their superiority.
The home side improved after the break and at last forced a save from Nicholls, who dived to smother a low 58th-minute drive from Matty James after a good run by Tommy Conway.
At the other end, Michal Helik sent a tame volley straight at goalkeeper Max O’Leary before City head coach Liam Manning made a change up front, sending on Wells for Conway.
Still Huddersfield looked the more likely scorers and Rudoni was narrowly wide with a low shot from inside the box after 68 minutes.
Koroma sent an acrobatic volley at O’Leary as Huddersfield struggled to find the finish to match their approach play, with O’Leary then having to make a smart save to keep out a Thomas shot.
City’s second substitute Anis Mehmeti shot over following a corner as both teams went all out for victory.
Koroma’s strike sent travelling supporters behind the goal into wild celebration and looked to have won it.
Substitute Rhys Healey almost made it 2-0 when heading over from a near post corner before the last-gasp penalty broke Huddersfield hearts.