Bristol City denied Wrexham a fifth successive Sky Bet Championship away win as Max Bird’s spectacular late volley secured a 2-2 draw at Ashton Gate.
Wrexham twice led through Ollie Rathbone and a Joe Williams own goal, but City were rewarded for a spirited second-half performance.
Sinclair Armstrong drove home soon after the restart and fellow substitute Bird smashed home off the underside of the crossbar from 20 yards out two minutes from time.
The prize at stake for the winner on a bitterly cold night was sixth spot.
City had revived their promotion bid with a weekend win at Hull, but they had some making up to do with home fans after being thumped 5-0 by Derby in their previous appearance at Ashton Gate.
George Tanner escaped injury after being clattered by his own goalkeeper Radek Vitek and Neto Borges sent a shot skywards from the edge of the box.
Mark Sykes was adamant Dominic Hyam had handled a bouncing ball in the Wrexham area, but his animated appeal for a penalty was waved away by the referee, Ruebyn Ricardo.
Wrexham hit the front after 34 minutes when Doyle’s cross ricocheted into the path of Rathbone, who smashed a first-time left-footed shot high past Vitek.
Bristol City manager Gerhard Struber’s triple substitution at the interval turned the game on its head, with Armstrong, Delano Burgzorg and Jason Knight making an instant impact.
Arthur Okonkwo saved from Tomi Horvat and Armstrong within seconds of the restart but the Wrexham goalkeeper was exposed again moments later.
Horvat fed Armstrong down the right and the substitute made light of a difficult angle by powering the ball across Okonkwo and into the corner of the net.
The muscular Armstrong was a threat every time he touched the ball, but the momentum shifted Wrexham’s way after 76 minutes.
Issa Kaboré guided the ball into middle of the box and the unfortunate Williams was unable to sort his feet out and put the ball past Vitek.
Bird’s fantastic volley provided a sting in the tail and, after George Dobson had wasted two glorious chances to win it for Wrexham, Derby clung on to sixth spot.
Terry Devlin scored a spectacular long-distance strike as his brace helped Portsmouth move four points clear of the Championship relegation zone with a 3-1 win at Charlton.
The Northern Ireland full-back’s first goal of the evening had to go down as a goalkeeping error by Thomas Kaminski.
Colby Bishop doubled Pompey’s advantage at the break with Devlin adding a brilliant third in front of the travelling support.
Charlton substitute Jayden Fevrier’s 64th-minute goal proved to be only a consolation as Portsmouth recorded a first league double over their opponents since the 1985-86 season.
The two clubs held a minute’s applause before kick off in memory of Addicks supporter Norman Barker, whose passing during the 6 December fixture saw the match abandoned in the 12th minute.
Charlton had a huge chance to score inside the opening minute but Portsmouth goalkeeper Nicolas Schmid saved Harry Clarke’s attempt with his legs.
That fast start was not maintained by the hosts as the visitors, missing 13 first-teamers due to injuries, showed more control of the ball before the break.
Kaminski will not want to watch back the opening goal in the 22nd minute as Devlin’s swerving low strike from outside the area squeezed between his legs – ending the home team’s hopes of recording a fourth straight clean sheet.
It got worse for the London club when the referee, Leigh Doughty, who dished out six cautions in the opening 45 minutes, ruled that Amari’i Bell had handled Gustavo Caballero’s cross inside the penalty area.
Kaminski was booked for his protests before Bishop tucked his spot-kick down the middle. It was only the forward’s second league goal of the campaign and his first since August 23.
Charlton manager Nathan Jones made a triple change before the restart but Portsmouth went further ahead with a sensational strike from distance by Devlin in the 56th minute which flew into the top right corner.
Fevrier cut the deficit, finishing cutely from Lyndon Dykes’ flick-on from a long throw.
