Fly-half Joel Hodgson kicked a last-gasp penalty as Newcastle Falcons snatched a 16-14 victory over Gloucester at Kingston Park.
Victory in the Aviva Premiership tussle keeps alive Newcastle's hopes of a place in next season's European Cup.
It was a crunch match for both sides and Gloucester, 14-10 up with 15 minutes to go after tries from Jonny May and Tom Marshall, both converted by Billy Twelvetrees, had seemed to have it sewn up.
Hodgson kicked a 66th-minute penalty to cut the lead to just one point. And in a frantic finish, Newcastle piled on pressure at a scrum inside the Gloucester half to win a penalty. With the clock showing no time remaining, Hodgson stepped up to kick it and win the game.
Newcastle dominated possession in the opening half hour and were rewarded with a 27th-minute try from Juan Pablo Socino, converted by Mike Delany, but both sides did spurn a couple of good chances in a lively first half which finished 7-7.
An early break by Gloucester number nine Willi Heinz seemed certain to lead to a score with Charlie Sharples in close support, but Newcastle's cover tackling was exemplary and they closed the winger down.
Heinz's late hit on opposite number Michael Young saw Delany hit the post with the penalty from which Newcastle regathered the ball and drove for the line, and Vereniki Goneva was stopped right on the line at the expense of a penalty.
The Falcons went to the corner but blew the chance with a crooked throw at the lineout.
Goneva broke through again and it led to another penalty. Newcastle went to the corner again and hammered away through Goneva, Marcus Watson and Alex Tait to force another penalty and another lineout from which Socino was held up on the line. However, from the scrum the Argentinian centre crashed through and Delany converted for 7-0.
Just before the break, Gloucester hit back with a lineout drive of their own and the ball was worked across field for May to dart low between Goneva and Tait to score in the corner, and Billy Twelvetrees levelled the scores with the conversion.
Hodgson, on for Delany, kicked an early second-half penalty but a piece of individual brilliance from Marshall put Gloucester 14-10 up in the 48th minute.
The fullback stabbed the ball through to split the Newcastle defence and won the race to touch down for a try, albeit awarded by the TMO, and Twelvetrees' conversion made it 14-10 to the Cherry and Whites.
It seemed Newcastle would take the lead when Marcus Watson surged through the middle on a brilliant side-stepping run, but he just could not get the final pass in to Goneva.
Hodgson's penalty, after an offside call, cut the gap to just one point and Lloyd Evans made a high tackle on the Falcons fly-half that resulted in a sin-binning in the 71st minute.
Goneva put Newcastle on the front foot with a searing run out of defence but the home side looked to be out of time when they knocked on just outside the Gloucester 22. They turned the screw though and with time at a premium earned the penalty for Hodgson to win it.