Cardiff City claimed what may prove a vital point in the Championship relegation fight as Yakou Meite's stoppage-time goal secured a dramatic 2-2 draw at Preston North End.
Milutin Osmajic had drilled Preston into an early lead as Cardiff paid the price for a dispiriting first-half display.
Substitute Will Alves sparked a Bluebirds revival after the break, the on-loan Leicester City teenager scoring his first senior goal as his shot deflected beyond Preston keeper Dai Cornell.
Preston reasserted their control of the contest in the final quarter, and looked destined for victory after Stefan Thordarson's header restored the home side's advantage.
But in the fourth minute of added time, substitute Meite stole in at the back post to guide in Cardiff's second equaliser.
Cardiff remain in the relegation places, though the nature of the draw should lift Omer Riza's players as they prepare for a potentially key game against fellow strugglers Stoke City on Saturday.
It is now four matches unbeaten for Riza's team, though this was a third successive draw.
Preston, one of the division's draw specialists this season, stay 14th and are destined for a mid-table finish having won only one of their past eight league games.
Cardiff's urgent need for points was barely in evidence during a first period in which they were outbattled and outplayed.
What was on display was the defensive vulnerability which has been such an issue this season, with Will Fish's attempt to turn in his own box almost presenting Preston with an opener, only for Will Keane's precise finish to be ruled out for offside.
Riza's rearguard were soon opened up once more, as Dimitrios Goutas stretched to cut out Mads Frokjaer's through ball but only succeeded in teeing up Osmajic to drive a shot past Ethan Horvath at the near post.
A second goal might have followed as Keane crossed from the right, but this time Fish's sliding touch proved crucial as Osmajic could only find the side netting.
Only in the closing stages of the first half did Cardiff emerge as an attacking force, with Rubin Colwill forcing a decent save from Cornell.
Riza's response was a half-time change, with Goutas making way for Alves. Riza's reward was almost instant, as Alves exchanged passes with Yousef Salech before his shot towards the far corner hit Ben Whiteman and rolled inside Cornell's near post.
Suddenly Cardiff were the better side, but Preston took control once more as Osmajic struck the outside of the post before Thordarson glanced in from Frokjaer's cross.
But to their credit, Cardiff climbed off the canvas to level when the unmarked Meite steered in from fellow substitute Alex Robertson's cross – and Horvath then saved from Ryan Porteous with almost the last act of the game.
Preston North End: Cornell, Porteous, Whiteman ©, Keane (Riis 70’), Frøkjær-Jensen, Brady, Hughes (Greenwood 65’), Gibson, Þórðarson, Osmaji? (Lindsay 77'), Kesler-Hayden. Subs not used: Stowell, Meghoma, Evans, Storey, Ledson, Mawene.
Cardiff City: Horvath, Rinomhota (Robertson 65’), Goutas (Alves 46’), Fish, Daland, O'Dowda (C), Chambers, Mannsverk, R Colwill (Robinson 70’), Ashford (Davies 81’), Salech (Méïté 70’). Subs not used: Turner, Bagan, Turnbull, Tanner.