Wilfried Bony's injury-time penalty snatched a vital 2-1 victory for Swansea as Newcastle succumbed to a fifth successive Barclays Premier League defeat.
The Ivorian, who had earlier cancelled out Shola Ameobi's opener, struck from the penalty spot in the second minute of stoppage time after substitute Marvin Emnes had been tripped by Cheick Tiote.
Bony's double secured just a second league win in 10 attempts and could hardly have been more timely with the Swans sitting just three points clear of the drop zone before kick-off.
But defeat piled further pressure on Newcastle boss Alan Pardew, whose side has lost seven of its last nine home games and 12 of its last 17 anywhere.
They took the lead against the run of play as Ameobi ended their six-hours-and-23-minutes-wait for a goal.
However, Bony struck from a Ben Davies corner in first-half injury time and then completed the job from 12 yards at the death.
It was perhaps no more than Garry Monk's side deserved after enjoying the better of the game for long periods, and Pardew's critics among a crowd of 51,057 were predictably less than impressed.
Life is rarely dull at St James' Park and a week which has seen Pardew come under intense pressure ended in eventful fashion.
Pardew was able to recall leading scorer Loic Remy and full-back Mathieu Debuchy to the bench after injury, but was forced to use both before half-time as two of the three strikers in his starting line-up, Papiss Cisse and Luuk de Jong departed prematurely.
However, they were not the only men to head down the tunnel sooner than expected with referee Chris Foy, who was knocked over just seconds into the game after Newcastle skipper Fabricio Coloccini blocked Jonjo Shelvey's shot into his face, was replaced by fourth official Anthony Taylor.
There was also some football played during the opening 45 minutes, the more progressive of it by the visitors, who characteristically retained possession and attempted to create opportunities for Bony.
But despite the best efforts of midfielders Hernandez and Jonathan de Guzman, they were unable to create much of note other than a series of set-pieces, and that ultimately was to provide them with a way back into the game.
The Magpies, who had not scored a single goal since Cisse's late winner against Crystal Palace on 22 March, were initially ponderous, and it was not until Debuchy's arrival as a 21st-minute replacement for Cisse, which released Vurnon Anita from full-back into midfield, that they started to pose a meaningful threat.
But when the opening goal arrived two minutes later, it did so by the direct route.
Ameobi climbed high to head keeper Tim Krul's clearance down to De Jong, who in turn slipped the ball back into the striker's path and looked on as he held off his man before shooting left-footed on the turn past Michel Vorm, his first league goal since December 2012.
The home side briefly threatened to take the game by the scruff of the neck, but succumbed in stoppage time when Bony rose above Mike Williamson to head the latest in a series of inswinging Ben Davies corners beyond Krul.
Newcastle returned in determined mood with Dan Gosling forcing Vorm into a 48th-minute save with a volley from Paul Dummett's cross and Anita scuffing harmlessly wide from distance seconds later.
But the pattern of the first half was largely repeated with Swansea playing the more cohesive game, although Remy might have made more of Gosling's determined 56th-minute run and pull-back.
With Remy occupying a position wide on the left and Debuchy doing much the same on the right, the Magpies started to pose a greater threat and Anita flashed a left-foot volley across the face of goal.
Remy curled an ambitious effort from distance over the bar with 62 minutes gone and the drilled another dipping attempt into Vorm's midriff.
However, De Guzman curled a 78th-minute shot on to the roof of Krul's net and the Dutchman had to come from his line to deny Bony one-on-one five minutes later as the Welshmen pushed for a winner.
Krul had to be alert once again two minutes from time to keep out Shelvey's well-struck drive at his near post, but there was nothing he could do to prevent Bony from claiming victory from the spot.