January signing Andros Townsend turned in a man of the match display to hand birthday boy Rafael Benitez his first win as Newcastle grabbed a Barclays Premier League lifeline.
Townsend, a £12million January signing from Tottenham, set up Jamaal Lascelles and skipper Moussa Sissoko either side of the break and then added a third himself with a minute remaining as the Magpies secured a first victory since February 6 to keep alive their hopes of avoiding the drop.
Swansea gave as good as they got for long periods in the game, but could do nothing to prevent Benitez's men from collecting a first win in April since 2013 and send home the locals among a crowd of 48,949 with hope.
If Sunderland's 3-0 victory at Norwich earlier in the day had not exactly barged the door wide open for their neighbours, it had at least unlocked it, but only if they could follow suit.
Benitez made five changes to his team, two of which meant that Jonjo Shelvey, a £12million January signing from Swansea, started the afternoon on the bench alongside £13million striker Aleksandar Mitrovic.
Newcastle started in committed fashion, if without the required quality, although Lukasz Fabianski needed every inch of his sizeable frame to keep out emergency full-back Vurnon Anita's floated ninth-minute cross, the Swans goalkeeper getting down well to collect Townsend's follow-up after the ball was recycled.
Sissoko, who had tasted victory only once before in six games wearing the armband, blazed high over after cutting in front the right six minutes later, but as Jefferson Montero and Gylfi Sigurdsson started to make their presence felt, the visitors worked their way into the game.
However, Fabianski was called upon once again 12 minutes before the break when Jack Colback ran on to Cisse's intelligent flick-on, but could not beat the keeper with his left-foot strike.
Opposite number Karl Darlow was relieved to see Alberto Paloschi's driven 35th-minute cross come off Sigurdsson and drop into his waiting arms, but it was his side who took the lead with four minutes of the half remaining.
Cisse did well to force a left-wing corner and when Townsend delivered the ball to the near post, Lascelles lost his marker Sigurdsson to power home from close-range.
But Swansea returned in determined mood and went close twice in quick succession as it took a fine block by Chancel Mbemba to keep out Andre Ayew's shot before Paloschi glanced a header a cross the face of goal from Montero's cross.
St James' held its breath with 19 minutes remaining when central defender Ashley Williams was allowed to control the ball inside the penalty area and blast just wide, and there was even great relief when Montero fired wide after being played in by substitute Bafetimbi Gomis.
However, Newcastle finished in style when Sissoko powered home a second from close range after Townsend's 82nd-minute corner had dropped nicely for him, and Townsend wrapped up the win at the end after being picked out by substitute Mitrovic.
TWEET OF THE MATCH
Alan Shearer @alanshearer: " Well it's game on at the bottom now! Great result for @nufc. Look forward to Tuesday where I'll be at #SJP with @5liveSport #NUFCvSwans."
Karl Darlow: 6/10
Vurnon Anita: 7
Chancel Mbemba: 7
Jamaal Lascelles: 7
Paul Dummett: 6
Cheick Tiote (Shelvey, 66 mins): 7
Jack Colback: 6
Andros Townsend: 8
Moussa Sissoko (Capt): 7
Georginio Wijnaldum (Perez, 73 mins): 5
Papiss Cisse (Mitrovic, 80 mins): 6
Jonjo Shelvey: 6
Ayoze Perez: 6
Aleksandar Mitrovic: 7
Lukasz Fabianski: 6
Angel Rangel: 6
Ashley Williams (Capt): 6
Federico Fernandez: 6
Neil Taylor: 6
Jack Cork: 6
Leroy Fer (Barrow, 57 mins): 5
Andre Ayew (Gomis, 71 mins): 6
Jefferson Montero: 7
Gylfi Sigurdsson: 7
Alberto Paloschi: 7
Modou Barrow: 7
Bafetimbi Gomis: 6
Andros Townsend was Newcastle's most creative player on the day, setting up the first two goals and then adding the third himself to pay off a sizeable portion of his £12million transfer fee.
MOMENT OF THE MATCH
Jamaal Lascelles' headed winner might have come from just a yard or so out, but given what it represented to his club and what it sparked, it might as well have been a 40-yard screamer.
VIEW FROM THE BENCH
Rafael Benitez admitted during his pre-match press conference that if his players ignored his instructions and won, the home fans would go home happy anyway. He saw plenty of effort and commitment and just about enough quality on a day when victory was the only option. Swansea counterpart Francesco Guidolin will have been frustrated both by his side's defending for the goals and their inability to make the most of a healthy share of the possession.
MOAN OF THE MATCH
Newcastle left-back Paul Dummett defended solidly and got himself into some good advanced positions, only to repeatedly hit the first man with his attempted crosses.
WHO'S UP NEXT?
Newcastle v Manchester City, Barclays Premier League (Tuesday, April 19)
Leicester v Swansea, Barclays Premier League (Sunday, April 24)