Newcastle United escaped Carabao Cup embarrassment at Newport by the skin of their teeth as Jonjo Shelvey's late strike and a 5-4 penalty shootout victory sent them through to the quarter-finals.
Newport were three minutes away from adding Newcastle to their long list of cup scalps, with the League two side hanging on to their fifth-minute lead given to them after goalkeeper Mark Gillespie's error handed Tristan Abrahams a bizarre opener.
But a stunning long-range strike from Shelvey spared Newcastle blushes as a 1-1 draw sent the tie to penalties, where Brandon Cooper blazed the decisive spot-kick over to send Steve Bruce's men through.
Newport: Townsend (8), Cooper (7), Dolan (7), Demetriou (7), Shephard (7), Bennett (7), Sheehan (6), Twine (8), Haynes (6), Abrahams (6), Amond (6).
Subs: Willmott (n/a), Collins (n/a), Taylor (n/a).
Newcastle: Gillespie (5), Manquillo (5), Krafth (6), Fernandes (6), Lewis (6), Shelvey (7), S Longstaff (6), Murphy (6), Almiron (5), Fraser (6), Carroll (5).
Subs: Joelinton (5), Wilson (6), Schar (6)
Man of the Match: Nick Townsend.
- How Newport and Newcastle lined up | Match stats
- Carabao Cup fixtures | Results | Live on Sky
- Two channels for the price of one - 146 live PL games + EFL for just £18 p/m
How Newcastle escaped Newport shock
Having defeated Leeds, Leicester and Middlesbrough in recent years, Newport were on the trail of another cup shock inside five minutes at Rodney Parade.
Scott Twine's dipping 30-yard effort struck the crossbar and in-from striker Abrahams reacted first to the rebound, forcing a horror moment from Magpies goalkeeper Gillespie who could only parry the shot into his own net.
With a lead to defend, Newport produced a robust defensive display to frustrate Newcastle's attempts to get back into the tie, with goalkeeper Nick Townsend denying two Jacob Murphy strikes in quick succession before Shelvey's miscued shot on the swivel was kept out.
As the half wore on, Newport pushed for a second, with Scot Bennett whistling a shot past the angle of post and bar before cup-specialist Padraig Amond flashed a shot inches over the bar as half-time approached.
- Padraig Amond and Scot Bennett returned as Newport made two changes from the win at Bolton.
- Newcastle made seven changes from the draw at Spurs, with Javier Manquillo, Federico Fernandez, Jonjo Shelvey and Miguel Almiron retaining their places.
Mickey Demetriou blocked a Murphy volley within seconds of the restart before Townsend raced off his line to thwart Ryan Fraser and Miguel Almiron attempts in quick succession, after a long ball over the top opened up the Newport defence.
Bruce introduced Callum Wilson and Joelinton on 65 minutes and Newcastle continued to apply pressure as Newport legs began to tire.
A backs-to-the-wall defensive effort from the hosts looked set to frustrated Newcastle, as a brilliant last-gasp challenge from Cooper denied Fraser.
But Newcastle finally made the breakthrough with three minutes remaining when Shelvey found the top corner from 18 yards with an exquisite curled effort.
It was advantage Newport early on in the shootout as Townsend saved from Joelinton, but Gillespie's save from substitute Ryan Taylor and Cooper's wild effort handed the victory to the Magpies.
What the managers said…
Newport manager Michael Flynn: "It's a tough way to lose but I'm proud of my team, I thought the boys were absolutely superb.
"But one bit of magic levelled the tie and that happens when you give Premier League players that amount of space."
Newcastle boss Steve Bruce: "They're a decent football side. They threw everything at us especially in the last 10-15 minutes.
"We had, I don't know, 27 attempts, 10 on target - but until you get a goal it's always in the balance. They got one after five minutes and it gave them a bit more belief than they had."
Live Premier League
Newport host Mansfield Town in Sky Bet League Two on Saturday at 3pm, before Newcastle host Burnley on Saturday Night Football at 8pm - live on Sky Sports Premier League.