Matt Richie's second-half strike proved the difference as Newcastle stunned Manchester United 1-0 at St James' Park.
The hosts grabbed what proved to be the winner midway through the second period as Chris Smalling conceded a free kick and Newcastle made the most of their opportunity.
Smalling was booked for diving - inside his own half - and conceded the set piece as Ayoze Perez's flick on found Richie in space.
The winger fired home for his first goal of the season to give Newcastle a vital victory in their battle against the drop.
The visitors had looked the more likely but they found debutant Martin Dubravka in inspired form in the home goal as he denied Anthony Martial in the first half.
Newcastle were unlucky not to be awarded a first-half penalty when Smalling tripped Dwight Gayle.
The Old Trafford outfit nearly found an equaliser in the closing stages but Dubravka again kept out an effort from Martial.
The result moves Newcastle out of the bottom three and two points clear of danger, while the Red Devils are 16 points adrift of league leaders Manchester City after 27 games.