Steve Cook's last-gasp header helped Bournemouth move out of the Premier League's bottom three thanks to a 1-0 win over Newcastle United.
The Cherries had earlier hit the post through Marc Pugh, but the visiting fans were celebrating deep into injury time when Cook rose highest to nod in Andrew Surman's corner.
It compounded a frustrating afternoon for Newcastle, who had seen Dwight Gayle have a goal debatably ruled out for offside when following in a shot from Matt Ritchie that hit the post.
But Rafael Benitez's men failed to build on a strong opening half an hour and, in the end, Bournemouth could have won more comfortably had Callum Wilson not wasted a great chance and Pugh not been denied by the woodwork.
Three points for Eddie Howe's men sees Bournemouth climb up to 16th and means they have won back-to-back away Premier League games for just the second time.
Newcastle, meanwhile, have lost consecutive matches and the end of a four-match unbeaten home run sees them drop into the bottom half.
Newcastle made all of the early running and former Bournemouth winger Ritchie's 25-yard effort drew a fine fingertip save from Asmir Begovic.
Cook then made a crucial block to deny Gayle's goalbound header, before Christian Atsu stung the palms of Begovic with a long-range effort.
The hosts did have the ball in the back of the net in when Ritchie's terrific, bending effort struck the post and was followed in by Gayle, who was - perhaps harshly - ruled offside.
Having withstood the early barrage, Bournemouth grew into the match and Josh King dragged wide from the edge of the area.
Wilson – starting a Premier League match for the first time since January – then saw a looping header well saved by a back-tracking Rob Elliot, before the goalkeeper was again called upon to parry King's half-volley.
Newcastle started on the front foot again after the break and Joselu headed a Jonjo Shelvey corner into the ground that looped up and had to be tipped over by Begovic.
But shortly after Wilson missed a gilt-edged chance for the visitors. King's flick split the home defence and the striker raced onto the pass but fired a left-foot shot into the side-netting when one on one.
Newcastle lost captain Jamaal Lascelles, who picked up a knock in the first half, to injury, and at the other end Marc Pugh failed to test Elliot with a presentable header.
Bournemouth threw on former Sunderland striker Jermain Defoe, who had scored on his last three visits to St James' Park, to a chorus of boos in a bid to find a goal, and the visitors must have thought their luck was out when Pugh showed great feet in the area but a combination of Elliot and Ciaran Clark steered his shot against the right post.
However, there was one last moment of drama as Surman's corner from the right was met with a thumping header by Cook – much to the delight of the visiting fans, who had travelled over 350 miles to attend.
Key Opta stats:
- This is only the second time that Bournemouth have won back-to-back away games in the Premier League, with the previous occurrence happening in December 2015.
- Bournemouth won a Premier League game with a 90th-minute winner for only the third time – the previous two were vs West Ham (4-3 in March 2017) and vs Liverpool (4-3 in Dec 2016).
- The last time that Newcastle lost a Premier League home game through a 90th-minute goal was back in December 2015 (0-1 vs Everton).
- This is the third successive Premier League game that Newcastle have played in that has ended 1-0 with the winning goal being scored in the final 16 minutes of the match.