Newcastle survived a scare from fourth-tier Newport before reaching the League Cup quarter-finals with a 5-4 penalty shoot-out win after their 1-1 draw on Wednesday.
Steve Bruce’s Premier League side fell behind early in the first half at Rodney Parade as Tristan Abrahams netted for the hosts.
But Jonjo Shelvey equalised with just three minutes left to force the shoot-out.
Joelinton saw his effort saved by Newport goalkeeper Nick Townsend.
But Mark Gillespie saved Ryan Taylor’s effort and Brandon Cooper blazed over the bar to hand the Magpies victory.
Bruce made seven changes to the team that drew at Tottenham on Sunday, but Newcastle’s understudies got off to the worst possible start in the fifth minute.
When Scott Twine’s shot hit the bar, Abrahams followed up with a scuffed effort that Newcastle’s reserve keeper Gillespie fumbled into the net.
Having beaten Leeds, Leicester and Middlesbrough in recent years, Newport were scenting another cup shock as the lowest ranked team left in the tournament scrambled away Andy Carroll’s header.
Newcastle made a faltering response, with Jacob Murphy forcing a save from Townsend before Shelvey completely miscued from close-range.
Newcastle’s 7-0 win at Morecambe in the last round was their biggest ever competitive away victory.
Goals were proving much hard to come by this time and Townsend saved well from Ryan Fraser after the interval.
Bruce sent on strikers Callum Wilson and Joelinton in a bid to force an equaliser, with Fabian Schar heading wide from close-range in a frantic finale.
Newcastle were on the brink of a miserable exit when Shelvey came to their rescue as the midfielder curled a fine finish into the top corner after wriggling clear of the Newport defence.
Wilson, Schaer, Shelvey, Murphy and Sean Longstaff all converted from the spot for Newcastle in the shoot-out.
Later on Wednesday, holders Manchester City face Burnley at Turf Moor, Manchester United head to Brighton and Everton host West Ham.
Tottenham beat London rivals Chelsea 5-4 on penalties after a 1-1 draw in the first last 16 tie on Tuesday.