Match ends, Sunderland 3, Chelsea 2.
Sunderland climbed out of the bottom three after two goals in three second-half minutes saw them fight back for a dramatic win over Chelsea.
Diego Costa's precise finish gave the Blues the lead but Wahbi Khazri levelled with a spectacular volley.
Nemanja Matic found space to restore Chelsea's lead before Sunderland turned the game on its head after the break.
Fabio Borini beat Thibaut Courtois with a deflected shot, before Jermain Defoe swivelled to score a vital winner.
Chelsea captain John Terry was sent off for a second booking before the final whistle, with the end of the game bringing scenes of celebration from the Sunderland players and fans.
With Newcastle held by Aston Villa and Norwich losing to Manchester United, Sunderland will stay up if they win one of their final two matches of the season.
The Black Cats host Everton on Wednesday, and are away to Watford on the final day.
Defoe does the trick - again
Jermain Defoe has now scored 15 of Sunderland's 40 goals this season, and his goals have earned 14 of their 35 points.
The former England striker showed again how vital he is to their survival hopes with the way he took his winner after 70 minutes.
Until then, Defoe had been frustrated all afternoon, with his only effort to reach goal a header against the post that would not have counted anyway, because the flag was already up.
But when Deandre Yedlin's cross was deflected into his path, Defoe made no mistake - taking a touch to bring the ball under control, then burying it into the net.
"To win the game like that was special," said Defoe. "It's been a while since I scored at home but, as a forward, it doesn't matter where you score - it's important that you score."
Black Cats boss Sam Allardyce added: "You give Jermain a chance and generally he at least hits the target.
"We've crawled out of the bottom three by the number of goals that he's scored. Without him I dread to think where we would be as a team."
Will we see Terry play for Chelsea again?
John Terry's late dismissal for a second booking means his season is over.
The 35-year-old may also have played his final game for Chelsea, after 483 Premier League appearances over the past 17 years.
Terry could have few complaints for being sent off - following up the foul on Defoe that brought his first yellow card after 86 minutes with a late lunge on Khazri deep in stoppage time that meant he saw red.
It was the second time the Chelsea captain has been sent off this season, which means he will be banned for both of his side's remaining games - away at Liverpool on Wednesday and at home to champions Leicester on 15 May.
Terry's contract expires in the summer, and in February he said he had not been offered a new deal - although the Blues interim boss Guus Hiddink said at the time it was possible that Terry could stay.
Man of the match - Vito Mannone
The stats you need to know
- Gary Cahill was booked after 44 seconds, the second quickest booking in the Premier League this season (Max Gradel, 37 seconds, for Bournemouth v Leicester in August).
- Diego Costa has been involved in 14 goals in his last 14 Premier League games for Chelsea (nine goals, five assists).
- Wahbi Khazri ended a run of nine Premier League games without providing either a goal or assist.
- Fabio Borini has scored in each of his last three Premier League appearances against Chelsea for Sunderland (three goals).
- Jermain Defoe has scored 18 goals in all competitions this season, 13 more than any other Sunderland player.
- Chelsea have conceded 50+ goals in a Premier League season (51) for the first time since 1996-97 when they conceded 55.
- 23KonéSubstituted forO'Sheaat 55'minutes
- 15KaboulBooked at 87mins
- 3van Aanholt
- 27KirchhoffSubstituted forWatmoreat 64'minutes
- 6CattermoleBooked at 52minsSubstituted forLarssonat 71'minutesBooked at 88mins
- 18DefoeBooked at 70mins
- 2IvanovicSubstituted forBabaat 68'minutes
- 24CahillBooked at 1mins
- 26TerryBooked at 90mins
- 12MikelSubstituted forTraoreat 83'minutes
- 22WillianSubstituted forOscarat 80'minutes
- 10E Hazard
- 19Diego Costa
- 11Da Silva
- Mike Jones
- Shots on Target
Second Half ends, Sunderland 3, Chelsea 2.
Attempt saved. Bertrand Traore (Chelsea) left footed shot from the left side of the box is saved in the bottom right corner. Assisted by Eden Hazard with a headed pass.
Offside, Sunderland. Jermain Defoe tries a through ball, but Wahbi Khazri is caught offside.
Second yellow card to John Terry (Chelsea) for a bad foul.
Foul by John Terry (Chelsea).
Wahbi Khazri (Sunderland) wins a free kick in the defensive half.
Attempt missed. Fabio Borini (Sunderland) right footed shot from outside the box misses to the right. Assisted by Yann M'Vila.
Foul by Baba Rahman (Chelsea).
Duncan Watmore (Sunderland) wins a free kick in the defensive half.
Attempt blocked. Cesc Fàbregas (Chelsea) right footed shot from outside the box is blocked.
Diego Costa (Chelsea) wins a free kick in the attacking half.
Foul by John O'Shea (Sunderland).
Sebastian Larsson (Sunderland) is shown the yellow card for a bad foul.
Eden Hazard (Chelsea) wins a free kick in the defensive half.
Foul by Sebastian Larsson (Sunderland).
Attempt blocked. Younes Kaboul (Sunderland) right footed shot from outside the box is blocked. Assisted by Yann M'Vila.
Younes Kaboul (Sunderland) is shown the yellow card.
John Terry (Chelsea) is shown the yellow card for a bad foul.
Foul by John Terry (Chelsea).