Adam Johnson scored in the 90th minute to give Sunderland their fourth successive win over Newcastle in the Tyne-Wear derby.
The winger placed his shot past Jak Alnwick following an excellent counter-attack by the Black Cats.
They also went close through Steven Fletcher, whose shot hit the post, while Connor Wickham wasted chances.
Newcastle striker Ayoze Perez was twice denied by Costel Pantilimon, who also saved from Moussa Sissoko.
There was barely time for the home side to test the Romanian keeper again after the goal, as Sunderland held on for their third successive victory on Tyneside and only theirthird league win of the season.
The result lifts them to 14th in the table, and further cements Gus Poyet's hero status among the club's fans after he once again commandeered his players to a memorable victory at their rivals.
As for Newcastle boss Alan Pardew, the result and manner of it will be tough to swallow. He now carries the unwanted tag of being the first Magpies manager to lose four successive Tyne-Wear derbies.
Bar a strike from Sissoko, the Magpies barely threatened in the first half. But they improved after the break and went close to taking the lead through Perez, who forced an brilliant save from Pantilimon. The keeper also denied the Spain Under-21 striker with a good low stop.
Sunderland were sloppy with their passing in the second 45 minutes, having looked more assured in the first. They created several chances to score in that period with Fletcher firing a volley against the crossbar and Wickham wasting two efforts with his head.
Poyet's men picked up two yellows to Newcastle's three in a feisty opening half, although their battling midfielder Lee Cattermole escaped a booking despite scything down Daryl Janmaat in the first minute.
With the match looking as if it was going peter out to a draw, Sunderland sprung a surprise.
Newcastle looked susceptible on the counter throughout the match and were caught again. Johnson, who had earlier missed with a side-foot effort from eight yards, made no mistake when he smashed home Will Buckley's lay-off. It was the former Middlesbrough player's third goal in three seasons against Newcastle.
Earlier in the match, the Magpies fans paid tribute to their rivals for their support in the aftermath of the deaths of fans Liam Sweeney and John Alder in the MH-17 crash in July, while their Sunderland counterparts applauded in tribute on 17 minutes.