Ashley Barnes scored a dramatic injury-time winner as Burnley beat Crystal Palace 3-2 in an enthralling Premier League contest at Turf Moor on Saturday.
Sean Dyche's men were in cruise control at half-time as goals from Sam Vokes and Johann Berg Gudmundsson put the Clarets into a 2-0 lead.
However, the hosts were rocked by a second-half Palace revival as first substitute Connor Wickham hammered home Wilfried Zaha's cross before Christian Benteke levelled from the penalty spot.
It appeared as though Palace had done enough to clinch a point but, with the clock winding down, Barnes - whose last goal came in February 2015 - finished another brilliant Burnley counter to steal the points.
Burnley consequently climb into the top half, while Palace's winless top-flight run stretches to five matches - leaving them 15th.
It took just two minutes for Burnley to take the lead from a lightning counter-attack.
Jeff Hendrick pounced on Yohan Cabaye's hesitancy to launch the move before Gudmundsson's left-wing cross picked out Matt Lowton and, although Steve Mandanda saved his volley, Vokes prodded home from the ensuing battle.
Palace sought a response and Tom Heaton comfortably saved from Jason Puncheon's low drive before making a fine block from Zaha's close-range effort.
But the visitors were caught cold by another Burnley counter in the 14th minute.
Vokes played in Gudmundsson, who hit a 20-yard drive at goal that Mandanda got a hand to but saw the ball slip under his body and loop into the net.
Andros Townsend went agonisingly close to halving the deficit with a strike that narrowly cleared the post and the visitors' frustration continued when Benteke directed Puncheon's cross wide shortly before half-time.
Burnley started the second half well and Vokes squeezed a shot wide before twice being denied by Mandanda after bursting into the area on the left.
However, Palace produced a suckerpunch of their own on the hour.
Zaha swept a low centre in behind Michael Keane from the right and Wickham - on the pitch less than a minute - met the ball to rifle high into the net.
The momentum was now firmly with Palace and they were awarded a penalty with nine minutes remaining when Lowton handled in the area from Townsend's cross, with Benteke coolly rolling the ball into the bottom left-hand corner to make it 2-2.
Palace piled forward in search of a winner, but their attacking ventures proved costly in the 94th minute.
Barnes raced forward through the middle and passed wide to Gudmundsson before meeting the return cross with a thumping finish into the roof of the net.
There was almost one last twist when Townsend cracked a shot against the woodwork, but Burnley held on for a thrilling victory.