Brothers Shola and Sammy Ameobi teamed up with both the goals to prevent Newcastle's season taking a further turn for the worse at Morecambe.
- Related Content
Shola came off the bench to open the scoring with a deflected 84th-minute shot, and Sammy made sure in the fourth minute of stoppage time to book the Magpies' place in the third round of the Capital One Cup, something which had looked far from certain for much of the previous 80 minutes or so.
It was a first win of the season for manager Alan Pardew, who fielded a much-changed side, but was far from convincing.
Jim Bentley's men enjoyed the better of the first half and created four gilt-edged opportunities to take the lead, and only the vigilance of Dan Gosling and keeper Rob Elliot prevented them from doing so.
Gosling, handed the task of guarding the near-post area for defensive corners, hacked Mark Hughes' 10th-minute header off the line, and somehow managed to smuggle away Padraig Amond's attempt 11 minutes later.
Amond proved something of a menace and Elliot was called upon twice in quick succession to deny him as the winger managed to find space all too easily.
Newcastle had chances of their own, none of them better than the one with which half-time substitute Shola Ameobi was presented within four minutes of his arrival.
Gosling's through-ball handed him a one-on-one with keeper Barry Roche, but his finish was wild.
Morecambe combined a fluidity in their play with a physical presence which rattled the visitors at times, with France international Mathieu Debuchy being given a rough ride by experienced striker Kevin Ellison.
By contrast, the Magpies repeatedly went long in a bid to get in behind their hosts, too often with little success until their late salvo.
Newcastle headed for the Lancashire Coast with rebellion fomenting back at home, with Yohan Cabaye's situation unresolved and, despite much speculation over potential arrivals during the final few days of the transfer window, no tangible progress.
The travelling fans at the Globe Arena made little secret of their displeasure as they urged owner Mike Ashley to both spend some money and get out of the club, although neither quite that politely, and also enquired as to the whereabouts of director of football Joe Kinnear's promised signings.
That said, they had little else to occupy them during the opening 45 minutes of the game with Pardew's much-changed team - only Debuchy, Mapou Yanga-Mbiwa and Sylvain Marveaux were retained from the weekend - singularly failing to dominate the game.
There were flashes of endeavour from Marveaux and Sammy Ameobi in particular but had it not been for forgotten man Gosling, the Magpies could have left the pitch red-faced at the break.
The former Everton midfielder twice cleared headers off the line inside the opening 21 minutes, first from Hughes and then Amond with the League Two side enjoying the better of the first half.
It was Gosling, too, who managed his side's first attempt on target, although his 28th-minute header failed to trouble Roche.
By contrast, opposite number Rob Elliot found his goal repeatedly under threat, and he had to save twice in quick succession from wideman Amond as he was allowed to get in behind left-back Paul Dummett.
The visitors rallied as the half entered its final 10 minutes, with Gael Bigirimana forcing Roche to tip a well-struck 39th-minute free-kick over and Sammy Ameobi smashing a goal-bound shot straight at team-mate Yanga-Mbiwa.
However, Elliot was less than convincing as he turned away Ryan Williams' 41st-minute free-kick, with the Shrimps scenting blood.
Shola Ameobi replaced Haris Vuckic at the break and he should have put Newcastle in front within four minutes when he ran on to Gosling's defence-splitting pass but, with just Roche to beat, fired high and wide.
Dummett passed up a good opportunity to deliver a dangerous cross and his side was almost punished within seconds when Morecambe striker Jack Sampson curled a long-range effort just wide with the outside of his left foot.
Marveaux thumped a 61st-minute volley over after running on to a weak clearance, but Sampson went close at the other end once again with a rising drive.
Hatem Ben Arfa's arrival with 19 minutes remaining added invention, but it was Dummett who came closest to breaking the deadlock with a piledriver from distance.
However, with extra time looming, Shola Ameobi turned on Ben Arfa's pass to drill in a low show which clipped Hughes and flew past the wrong-footed Roche and his younger brother added a second from close range with the home side pressing desperately for an equaliser.