Yoane Wissa scored a 95th-minute winner to help his Brentford side beat Bournemouth in a stunning finish at the Vitality Stadium in the Premier League.
Bryan Mbeumo played in substitute Wissa, who buried his finish from a tight angle to give the Bees just their fifth league win in 2024.
After an even first 86 minutes Mbeumo gave Brentford the lead as Wissa met goalkeeper Mark Flekken's long ball forward and set up his strike partner for an easy finish.
But fewer than three minutes later Dominic Solanke equalised, meeting Marcos Senesi's cross with a looping header.
The match also contained two key Video Assistant Referee (VAR) interventions, with a Solanke goal ruled out in the 27th minute and Brentford denied a penalty after referee Matt Donohue had initially pointed to the spot for a challenge on Ivan Toney.
Brentford win after VAR drama
Brentford fans on the south coast went through all sorts of emotions in the last 10 minutes.
Having thrown away their initial lead, DR Congo forward Wissa was composed in the area to drill home his fourth goal in six matches.
"It was a fantastic response and mentality from the players," Brentford manager Thomas Frank told BBC Match of the Day.
"I've said it before that this group are special in the way they come back."
The final whistle eventually came in the 104th minute, much to the relief of Frank's side.
And most of that added time was caused by an overturned penalty decision.
In the 75th minute Toney went down in the box after appearing to be pushed over by Bournemouth's Illia Zabarnyi.
Referee Donohue, overseeing his first Premier League match, had initially awarded a penalty, but was sent to his pitchside monitor by VAR and eventually overturned his original decision.
"I can understand why it's overturned," Frank added. "I still think it's borderline if it's a clear and obvious mistake."
After securing their highest-ever Premier League finish of ninth last season, Brentford will have to settle for a bottom-half place this time around.
But this win at Bournemouth was a reminder of the side's composure and efficiency in the final third.
Second time lucky for Solanke with mask
Even with a loss in their final home game, Bournemouth have had a brilliant season.
Despite a nine-match winless start, the Cherries have recorded their highest ever points total and are 10th in the Premier League table with one game to play.
There was a jubilant mood inside the Vitality when Solanke appeared to open the scoring in the 27th minute with a driven finish.
Indeed, the England striker was so confident his early goal would stand he performed a pre-planned celebration - putting on an orange mask worn by the character Obito Uchiha in the manga series Naruto.
But referee Donohue overturned his initial decision after consulting the pitchside monitor and spotting the ball strike the arm of Antoine Semenyo in the build-up.
He had another strike hit the net 10 minutes later, although the referee had already blown after he fouled Brentford defender Kristoffer Ajer.
Solanke did eventually get his goal, and again donned his Naruto mask, but his strike did not earn the Cherries any points in the end.
Bournemouth boss Andoni Iraola - who was nominated for the Premier League's manager of the season award this week - was then booked after arguing over the decision.
"It's true that he [the referee] makes his [Premier League] debut," Iraola told BBC Match of the Day.
"He may be very good, but obviously he has had a very bad game."
He added he "didn't understand" why the first goal was disallowed, and that Solanke's other strike which was ruled out was "a big, big, big mistake".
The Cherries continued to push in an open game, with Lloyd Kelly heading a corner just wide midway through the second half.
But, as they tried to find a late winner of their own, the Bees were caught on the break by their opponents and ultimately fell to their fourth defeat in seven matches.
Player of the match
After the opportunity to rate players has closed, the score displayed represents the average from all the submissions by BBC Sport users.