Newcastle's Alexander Isak scored a dramatic stoppage-time winner at Nottingham Forest from the penalty spot to keep their hopes of a top-four finish firmly alive.
Isak, who had earlier cancelled out Emmanuel Dennis' opener in the first half, coolly placed his spot-kick into the right corner after Moussa Niakhate was penalised for handball in the box.
In an eventful encounter, Newcastle substitute Elliot Anderson thought he had made it 2-1 when he thumped in a header at the back post, only for it to be ruled out by VAR for offside in the build-up.
Newcastle were on top for large spells and hit the crossbar twice in the first half, either side of a glorious chance fired over by Joe Willock from close range.
Forest's opener came against the run of play when Newcastle defender Sven Botman unforgivably gifted possession to Dennis, who smartly chipped it over the players standing guard on the goalline.
The visitors' pressure eventually paid off when Willock set-up Isak for a precise volley into the far corner on the stroke of half-time and the Swedish striker later delivered the winner to spark celebratory scenes in the away end in Nottingham.
The result leaves Newcastle just a point behind Tottenham in fifth - and still with a game in hand - while Forest remain two points above the relegation zone.
Newcastle's effort pays off as Forest woes continue
Newcastle were made to work hard for their victory but it was well deserved.
They had already forced Forest goalkeeper Keylor Navas into action on numerous occasions in the second half as pressure grew inside the hosts' half, while defender Serge Aurier made a goalline clearance and striker Jacob Murphy volleyed wide from close range.
Luck appeared to be on Forest's side when Anderson's goal was ruled out for offside in the build-up, but Newcastle were eventually rewarded for their endeavour as Isak stepped up again to deliver the goods.
It was the first time this season Newcastle had come from behind to win in the Premier League and it strengthens their challenge for a Champions League qualification spot.
It was also another impressive showing from Isak, who now has six goals in 10 Premier League appearances after also netting in the 2-1 win over Wolves last weekend.
Travelling supporters remained packed in the stands long after the final whistle celebrating with the players on the pitch and chanting to their success in what could prove to be a significant result.
For Forest it was another disappointing result. The danger of relegation remains and they were not a match for Newcastle on Friday evening.
They had a late chance through Brennan Johnson in the dying minutes but did not trouble goalkeeper Nick Pope anywhere near enough.
Player of the match
IsakAlexander Isak
Nottingham Forest
Squad number25Player nameDennis
Squad number12Player nameNavas
Squad number38Player nameFelipe
Squad number22Player nameYates
Squad number20Player nameJohnson
Squad number34Player nameA Ayew
Squad number24Player nameAurier
Squad number10Player nameGibbs-White
Squad number6Player nameShelvey
Squad number32Player nameRenan Lodi
Squad number19Player nameNiakhaté
Squad number7Player nameN Williams
Squad number16Player nameSurridge
Squad number23Player nameFreuler
Squad number31Player nameGustavo Scarpa
Newcastle United
Squad number14Player nameIsak
Squad number32Player nameAnderson
Squad number39Player nameBruno Guimarães
Squad number28Player nameWillock
Squad number2Player nameTrippier
Squad number5Player nameSchär
Squad number22Player namePope
Squad number23Player nameMurphy
Squad number36Player nameS Longstaff
Squad number33Player nameBurn
Squad number4Player nameBotman
Squad number11Player nameRitchie
Squad number10Player nameSaint-Maximin
Line-ups
Nottm Forest
Formation 4-2-3-1
12Navas
24Aurier38Felipe19Niakhaté32Lodi
22Yates6Shelvey
20Johnson10Gibbs-White25Dennis
34A Ayew
12NavasBooked at 90mins24Aurier38Felipe19Niakhaté32LodiBooked at 90mins22YatesSubstituted forFreulerat 58'minutes6ShelveyBooked at 90minsSubstituted forFurtado Scarpaat 90+4'minutes20Johnson10Gibbs-WhiteBooked at 59mins25DennisBooked at 22minsSubstituted forN Williamsat 79'minutes34A AyewSubstituted forSurridgeat 79'minutesSubstitutes
4Worrall7N Williams8Colback13Hennessey15Toffolo16Surridge23Freuler28dos Santos de Oliveira31Furtado ScarpaNewcastle
Formation 4-3-3
22Pope
2Trippier5Schär4Botman33Burn
36S Longstaff39Bruno Guimarães28Willock
23Murphy14Isak10Saint-Maximin
22Pope2Trippier5Schär4Botman33BurnBooked at 33mins36S Longstaff39Bruno Guimarães28Willock23MurphySubstituted forRitchieat 84'minutes14Isak10Saint-MaximinSubstituted forAndersonat 45'minutesSubstitutes
1Dúbravka3Dummett6Lascelles9Wilson11Ritchie12Lewis13Targett19Manquillo32AndersonReferee:Paul TierneyAttendance:29,362Live Text
Match ends, Nottingham Forest 1, Newcastle United 2.
Second Half ends, Nottingham Forest 1, Newcastle United 2.
Alexander Isak (Newcastle United) wins a free kick on the left wing.
Foul by Gustavo Scarpa (Nottingham Forest).
Renan Lodi (Nottingham Forest) is shown the yellow card for a bad foul.
Alexander Isak (Newcastle United) wins a free kick on the right wing.
Foul by Renan Lodi (Nottingham Forest).
Substitution, Nottingham Forest. Gustavo Scarpa replaces Jonjo Shelvey.
Goal! Nottingham Forest 1, Newcastle United 2. Alexander Isak (Newcastle United) converts the penalty with a right footed shot to the top right corner.
Keylor Navas (Nottingham Forest) is shown the yellow card.
Jonjo Shelvey (Nottingham Forest) is shown the yellow card.
Penalty conceded by Moussa Niakhaté (Nottingham Forest) with a hand ball in the penalty area.
Attempt blocked. Alexander Isak (Newcastle United) header from the centre of the box is blocked. Assisted by Joe Willock with a cross.
Nick Pope (Newcastle United) wins a free kick in the defensive half.
Foul by Sam Surridge (Nottingham Forest).
Attempt saved. Brennan Johnson (Nottingham Forest) right footed shot from the right side of the box is saved in the bottom right corner.
Attempt blocked. Bruno Guimarães (Newcastle United) right footed shot from the centre of the box is blocked. Assisted by Matt Ritchie with a cross.
Kieran Trippier (Newcastle United) wins a free kick in the defensive half.
Foul by Neco Williams (Nottingham Forest).
Substitution, Newcastle United. Matt Ritchie replaces Jacob Murphy.
Our coverage of your Premier League club is bigger and better than ever before - here's everything you need to know to make sure you never miss a moment