Jonas Gutierrez scored a stoppage-time winner as Newcastle came from behind to dump Premier League strugglers Blackburn out of the FA Cup.
The Argentine played a one-two with Leon Best and lofted a delicate finish over goalkeeper Mark Bunn.
Blackburn had weathered an early storm before taking the lead through David Goodwillie's close-range finish.
A wonderful individual goal by Hatem Ben Arfa made it 1-1 before Gutierrez snatched the victory.
The winner arrived in the fifth minute of added-time but was just reward for a dominant second-half performance by the Magpies.
Ben Arfa's magical goal - the France international beat several Blackburn players before firing past Bunn - sparked a late onslaught and the hosts had already missed several chances before Gutierrez's late intervention.
The defeat inflicts further misery on Blackburn boss Steve Kean, whose team are rooted to the bottom of the league.
In fact, Blackburn could easily have fallen behind inside the first 10 minutes as Bunn was forced into saves by Leon Best and Gutierrez. Ben Arfa then teed up Yohan Cabaye, but the French midfielder fluffed his effort.
Blackburn responded with a spell of pressure and Ruben Rochina had a left-footed shot saved by Tim Krul in the 20th minute.
The opening goal came after 35 minutes when Grant Hanley's header from a Morten Gamst Pedersen corner was saved by Krul, and Goodwillie prodded home the loose ball.
Newcastle brought on Shola Ameobi early in the second-half and the big striker was soon into the thick of the action when Cabaye pounced on Henley's loose pass to play him in, but he lifted his shot high and wide.
But the home side were back in the game 20 minutes from time when Ben Arfa slalomed around several yellow shirts and fired an unstoppable left-footed shot into the roof of the net.
The Magpies pushed for a winner which almost arrived when Mike Williamson headed a Ryan Taylor corner against the bar.
And Williamson was denied once again seven minutes from time when Bunn clawed out his flicked header on the line.
But with seconds left Gutierrez exchanged passes with Best before clipping the ball past Bunn to send Newcastle into the fourth round.