Sub Barnes nets stoppage-time winner as Burnley sink plucky Palace
Substitute Ashley Barnes pounced four minutes into injury time to grab another last-ditch three points for Burnley in a five-goal thriller against Crystal Palace at Turf Moor.
The visitors had hauled themselves back from an early two-goal deficit through Christian Benteke's 82nd-minute penalty, only for Barnes - an 85th-minute replacement for Jeff Hendrick - to smash the winner from a Johann Gudmundsson cross.
It completed the second straight Turf Moor late show from Sean Dyche's side after Scott Arfield struck a last-minute winner against Everton a fortnight ago.
Palace's fourth straight defeat had looked increasingly likely after Sam Vokes and Gudmundsson fired the Clarets into a 2-0 lead inside the first quarter of an hour.
But Connor Wickham reduced the deficit with his first touch after replacing Jason Puncheon on the hour mark, then Benteke looked to have sealed the Eagles' revival before Barnes intervened in spectacular fashion.
Burnley grabbed the lead with less than two minutes on the clock when Matthew Lowton broke directly from a Palace corner and crossed for Gudmundsson, whose ball back into the box was eventually tapped home from close range by Vokes.
Palace responded by forcing a second corner from which Joel Ward came close, before Benteke set up Jason Puncheon for a rasping effort which was well saved by Heaton at the second attempt.
Heaton, star of the Clarets' goalless draw at Old Trafford last week, saved his side again two minutes later when he produced a great low save to deny Wilfried Zaha.
But all the Eagles' pressing came at a price as they left themselves alarmingly open to the counter-attack, and it was a weakness Burnley exposed again in the 14th minute.
Gudmundsson burst clear of the Palace defence and drove a shot from 25 yards which squirmed beneath hapless keeper Steve Mandanda and bounced twice before ending up in the net.
If the visitors were shell-shocked to find themselves 2-0 down they hardly showed it, with Townsend next to blaze a clear chance over the bar from a Ward corner.
But they remained distinctly vulnerable at the other end, with Mandanda going some way to redeeming himself when he saved well from Hendrick after fine work from Arfield in the box.
Benteke missed two golden chances to reduce the deficit in the dying minutes of the first half and Pardew's half-time team talk did not seem to have counted for much when the Clarets made the brighter start to the second half.
Vokes was at the centre of most of their forays forward, his effort from a tight angle saved twice by Mandanda as Hendrick rushed in to assist, then blazing another effort high and wide from eight yards.
Pardew had no choice but to act and he did so with a double substitution which paid off spectacularly just before the hour mark, as Wickham slammed his first goal of the season into the roof of the net from a Yohan Cabaye cross.
After surviving a spell of Burnley pressure, Palace grabbed their equaliser in the 82nd minute when Lowton handled a Townsend ball into the box and Benteke stepped up to hit the leveller past Heaton - only for Barnes to dash their hopes at the death.
There was still time for Townsend to be denied by a post, but Burnley held on to the three points in a frantic finish.