Battling Burnley showed they will not give up on their promotion dream as they came from behind to beat the high-flying Swans on a historic afternoon at Turf Moor.
An Ashley Williams own-goal and a Chris Eagles penalty gave the Clarets their first win in seven games to keep the play-off places in sight.
This may turn out to be the win that kick-starts a late push for glory, but if not it will still go down as a memorable day for Burnley captain Graham Alexander.
The 39-year-old came off the bench late on to register his 1000th appearance in professional football.
Alexander became only the second outfield player in English football to reach the landmark as he confirmed his status as a true legend of the game.
He was given a standing ovation as he entered the arena and, most fittingly, left it as a winner as Eddie Howe's men lifted the gloom with a first Turf Moor success in four attempts - four days before their make-or-break game in hand against Middlesbrough.
With top scorer Jay Rodriguez fit to return, the Clarets started on the front foot with Rodriguez clattering a couple of efforts into defenders and Eagles seeing plenty of the ball down the right flank and dipping an early volley just wide.
But despite some attractive build-up play Burnley were never able to test Swans' keeper Dorus De Vries.
And as the slick Welshmen eased their way into the game they posed an increasing threat.
The Clarets survived their first major scare after 17 minutes when flying former Turf Moor loanee Nathan Dyer pulled the ball back for Darren Pratley to scuff a shot against the post.
And the woodwork denied the visitors again five minutes later when Pratley this time provided the ammunition for leading scorer Scott Sinclair to head the ball against the inside of a post and into the grateful arms of Brian Jensen.
Fabio Borinin then chipped a free-kick just wide after being fouled by Michael Duff, who picked up the first booking of the afternoon.
And with the Swans carrying a constant menace on the break, Borini missed another chance eight minutes before the break when he completely failed to make any contact on another low cross from the dangerous Dyer.
The on-loan Chelsea man was at it again moments after the re-start following a slip from Andre Bikey as fired an effort across the face of goal.
The Clarets almost grabbed the lead themselves when Rodriguez headed a Danny Fox corner into the side netting but Borini wasn't kept waiting for long as he finally struck to make it 1-0 after 52 minutes.
The little Italian was played through by Pratley and made no mistake as he slotted the ball past the advancing Jensen to bag his fourth goal in five games.
Swansea must have sensed an end to their three-match losing streak away from home but to Burnley's credit they hit back almost straight away.
Howe had sent on Chris Iwelumo to try and beef up a lightweight attack but it was Swans defender Williams who headed into his own net as he failed to deal with a dangerous Eagles' cross.
The goal gave the Clarets and the crowd a massive lift, although they were almost silenced again after an hour when Pratley released for Neil Taylor for a shot which Jensen saved with his legs as both sides went all out for the winner.
With some measure of confidence restored the Clarets gave as good as they got and Rodriguez forced De Vries into a smart save after great perseverance from Eagles and the ever-willing Marney.
And with 13 minutes to go Burnley went 2-1 in front as they launched another rapid counter-attack.
Wade Elliott charged down the right and when he crossed, Rodriguez was flattened in the box and Eagles kept his cool to drill home his third successive penalty of the season.
Eagles had taken over the spot-kick duties from Alexander in the captain's absence from the side.
But with three minutes to go Alexander came on to help shore things up and see Burnley over the line in a moment of history that reverberated around Turf Moor and English football.
The story could only have been bettered by a goal and with the last kick of the game he all but provided it.
Only the finger tips of De Vries and the woodwork kept out his free-kick but with team success always more important than personal glory to the peerless midfielder it took no edge off the finale as he exited the pitch through a guard of honour formed by his prouder-than-punch team-mates.
Burnley: Jensen, Mears, Duff, Bikey, Fox, Ellliott, Marney, Cork, Eagles (Alexander 87), Rodriguez (Thompson 90), Delfouneso (Iwelumo 55). Subs: Carlisle, Wallace, Duffy, Grant.
Booked: Duff 23, Mears 48, Fox 85
Swansea: De Vries, Rangel, Williams, Monk, Taylor, Pratley (Moore 68), Dyer (Dobbie 82), Sinclair (Priskin 68), Gower, Britton, Borini. Subs: Tate, Beattie, Orlandi, Ma-Kalanbay.
Booked: Gower 49, Sinclair 67, Borini 74
Referee: David Webb