Match ends, Newcastle United 1, Swansea City 2.
A Wilfried Bony penalty in stoppage time ensured Swansea crept closer to Premier League safety and increased the pressure on Alan Pardew's Newcastle.
The Magpies, lacking confidence after four successive defeats, took the lead against the run of play thanks to Shola Ameobi's finish into the bottom corner.
But Bony headed home from a Ben Davies corner to level before the break.
The match seemed to be petering out when Marvin Emnes was felled by Cheick Tiote and Bony struck from the spot.
Newcastle's players had no time to respond, although their fans had ample opportunity to make their displeasure known as they watched Swansea's players and their coach Garry Monk celebrate on the pitch at the final whistle.
The Welshmen seemed to have settled for a draw before influential substitute Emnes weaved into the box and helped secure the points which take Swansea six points clear of the relegation zone.
If Swansea could have chosen their opponents after a week in which the club had to admit to "a couple of incidents between certain players" during training before last Sunday's defeat by Chelsea, it would probably have been Newcastle - a team they had beaten in their three previous league meetings.
But Newcastle have been obliging opponents to many teams this year, with this loss not only their fifth on the trot but also their ninth defeat in 12 league games.
However, for a match which ended so dramatically, it began with a moment of slapstick as referee Chris Foy was knocked to the floor in the first minute by the power of Jonjo Shelvey's ricocheted long-range effort, and was eventually replaced by fourth official Anthony Taylor.
Foy needed a moment to regain his composure after the blow to the face, but once the match did get under way, it was mostly played in Newcastle's half.
Swansea's midfield trio of Leon Britton, Shelvey and Jonathan De Guzman, dominated the middle of the pitch against what was, at times, a two-man Newcastle midfield as Pardew selected an attacking line-up after four games without neither a victory nor a goal.
But for all the possession enjoyed by Swansea, it was Newcastle who opened the scoring thanks to Ameobi's first goal since December 2012.
The striker outmuscled Davies in the air and, after combining with Luuk de Jong, found the bottom corner with his team's first shot on target.
Swansea gradually regained control and they were also assisted by first-half injuries to Newcastle forwards Papiss Cisse and De Jong.
With half-time looming, Swansea levelled as Bony rose above Newcastle's defence to head in for his fourth successive goal away from home.
The Magpies improved after the break, with both Dan Gosling and Vurnon Anita testing Michel Vorm in the visiting goal.
But the best chance of the half fell to Bony, who was put through by a defence-splitting pass by Emnes only for Tim Krul to sprint off his line and snuff out the danger.
But the Dutchman had one last chance to earn Swansea their third win during Monk's two-month tenure and did so, beating Krul to his right to spark wild celebrations in the away stand.
For a gallery of photos from Saturday's Premier League action, visit BBC Sport's Facebook page.
Swansea manager Garry Monk: "We started well in the first 20 minutes, but then they got the goal and we got a bit sloppy in our passing.
"Thankfully, our second goal was a penalty. It was good to get those rewards. We've played a lot better than we've done today and come away with nothing.
"It's been a difficult season and very inconsistent for the standards we've set. We're just trying to get a job done and these three points go a long way to doing that."
Newcastle manager Alan Pardew: "It was a game that looked like it was going to a draw. I felt we played a lot better and it was a killer blow that last goal.
"There's no way we should have allowed that to happen. There were three or four errors in that goal. I felt we should have won this game, but errors in both halves cost us dear.
"I'm disappointed because their effort was there, but we're making errors and getting punished for it and we can't afford to do that on the run we are on. We're going to have to grin and bear it and see what we can do."
Line-ups
Newcastle
Formation 4-2-3-1
- 1Krul
- 8Anita
- 36Dummett
- 24TiotéBooked at 90mins
- 6Williamson
- 2Coloccini
- 9CisséSubstituted forDebuchyat 21'minutes
- 15GoslingBooked at 32minsSubstituted forA Armstrongat 81'minutes
- 23Ameobi
- 18L de JongSubstituted forRemyat 40'minutes
- 11Gouffran
Substitutes
- 13Yanga-Mbiwa
- 14Remy
- 19Haidara
- 21Elliot
- 26Debuchy
- 27Taylor
- 43A Armstrong
Swansea
Formation 4-2-3-1
- 1Vorm
- 22Rangel
- 33Davies
- 7Britton
- 2Amat
- 6Williams
- 20De Guzmán
- 8Shelvey
- 10Bony
- 11HernándezSubstituted forEmnesat 81'minutes
- 15RoutledgeSubstituted forBartleyat 90+4'minutes
Substitutes
- 3Taylor
- 12Dyer
- 25Tremmel
- 27Bartley
- 54Ngog
- 56Fulton
- 57Emnes
- Referee:
- Chris Foy
- Attendance:
- 51,057
Match Stats
- Possession
- Home47%
- Away53%
- Shots
- Home14
- Away10
- Shots on Target
- Home4
- Away2
- Corners
- Home2
- Away8
- Fouls
- Home6
- Away9
Live Text
Post update
Full Time
Second Half ends, Newcastle United 1, Swansea City 2.
Substitution
Substitution, Swansea City. Kyle Bartley replaces Wayne Routledge.
Goal!
Goal! Newcastle United 1, Swansea City 2. Wilfried Bony (Swansea City) converts the penalty with a right footed shot to the top right corner.
Booking
Cheick Tioté (Newcastle United) is shown the yellow card for a bad foul.
Post update
Penalty Swansea City. Marvin Emnes draws a foul in the penalty area.
Post update
Penalty conceded by Cheick Tioté (Newcastle United) after a foul in the penalty area.
Post update
Offside, Swansea City. Michel Vorm tries a through ball, but Wayne Routledge is caught offside.
Post update
Attempt missed. Cheick Tioté (Newcastle United) right footed shot from outside the box is high and wide to the left. Assisted by Shola Ameobi.
Post update
Foul by Wilfried Bony (Swansea City).
Post update
Vurnon Anita (Newcastle United) wins a free kick in the defensive half.
Post update
Foul by Jordi Amat (Swansea City).
Post update
Adam Armstrong (Newcastle United) wins a free kick on the left wing.
Post update
Jonathan De Guzmán (Swansea City) wins a free kick in the defensive half.
Post update
Foul by Paul Dummett (Newcastle United).
Post update
Foul by Wayne Routledge (Swansea City).
Post update
Cheick Tioté (Newcastle United) wins a free kick in the defensive half.
Post update
Foul by Wilfried Bony (Swansea City).
Post update
Mathieu Debuchy (Newcastle United) wins a free kick in the defensive half.
Substitution
Substitution, Newcastle United. Adam Armstrong replaces Dan Gosling.