Premier League champions Liverpool twice let a lead slip as Brighton fought back in style to gain a victory that boosts their slim hopes of securing European football next season.
Substitute Jack Hinshelwood proved to be the match-winner as he made an instant impact and headed in Matt O'Riley's cross in the 85th minute, with the goal being given following a check by the video assistant referee (VAR) after it had originally been ruled offside.
The Reds led 1-0 and then 2-1 at half-time, before the Seagulls recovered well to move eighth in the table, three points above Brentford.
In an entertaining match at Amex Stadium, Liverpool took a ninth-minute lead through Harvey Elilott following good work from Conor Bradley, before Yasin Ayari equalised with a low strike.
But Dominik Szoboszlai restored the Reds' advantage in fortunate fashion.
He and Elliott combined to take a quick free-kick, and from the right side of the penalty area Szoboszlai seemingly attempted a cross into the box, only for the ball to fly over the head of home goalkeeper Bart Verbruggen into the net.
Alisson produced a superb fingertip save to deny Danny Welbeck, but could do nothing about Kaoru Mitoma's strike when he showed great technique to make it 2-2 before Hinshelwood's winner.
The Seagulls travel to Tottenham on Sunday's final day of the season, and the team that finishes eighth may qualify for the Uefa Conference League.
However, for that to happen, Chelsea would need to beat Real Betis in the 2025 final on Wednesday, 28 May and then finish seventh in the Premier League, or sixth as long as Newcastle then came seventh.
Line-ups
Brighton XI: Webster, Welbeck, Pervis Estupiñán, Mats Wieffer, Jan Paul van Hecke, Bart Verbruggen, Yasin Ayari, Simon Adingra, Carlos Baleba, Brajan Gruda, Yankuba Minteh
Subs: Veltman, Dunk, Igor, Matt O'Riley, Kaoru Mitoma, Carl Rushworth, Diego Gómez, Jack Hinshelwood, Harry Howell
Liverpool XI: Alisson, Salah, Tsimikas, Konate, Gakpo, Chiesa, Szoboszlai, Gravenberch, Elliott, Quansah, Conor Bradley
Subs: Endo, Van Dijk, Robertson, Joe Gomez, Kelleher, Alexander-Arnold, Luis Díaz, Nunez, Curtis Jones
luuilnpstu
25
Please try using fires blank for Messi too! we're use to that word with others and Ronaldo to the point it's lost its charm [Crylaugh][Crylaugh][Crylaugh]
Clemmin
24
GIF GIF GIF!: http://www.goalgif.xyz/v2/live/matchGifs?match_id=53877132&language=en
sosdenopz
21
How this Liverpool manage to win the league ?
McForlemu
20
This Brighton team messed up their European qualification chances too early! They play such good football, should have at least got a european spot and let Europe see what a gem this club's ideology is made up of. What a style, what a team!