Surrey secured their Division One status with a six-wicket victory over Somerset at The Oval, leaving the visitors in serious relegation trouble.
Somerset moved from 113-4 to 306 all out in their second innings with Steve Davies (58) and Peter Trego (68) hitting final-day half-centuries.
That left 143 to win for the hosts, which they knocked off in 32.4 overs.
Surrey are up to second, while Somerset must win their last game against Middlesex for a chance of staying up.
Both sides started the match as one of five teams who could still be relegated but defeat for Somerset, coupled with wins for Middlesex and Yorkshire this week, means they are 13 points from safety.
Even if Somerset beat 2016 champions Middlesex at Taunton next week, other results could still send them down to Division Two.
Somerset started the day still 51 behind Surrey's first-innings total but half-centuries Trego and Davies' resistance as well as a 48-run ninth-wicket partnership between Jack Leach and Dominic Bess set up the possibility of an unlikely victory.
They gave themselves a slim chance when Rory Burns, England opener Mark Stoneman and Ryan Patel were all dismissed to leave Surrey 73-3, but a 44-ball 42 not out from Ben Foakes took the hosts to 146-4.
Foakes hit six fours and a six while Kumar Sangakkara also made an important 35 in his final first-class innings at The Oval. The 39-year-old Sri Lankan has scored 1,442 Championship runs this season at an average of more than 110.
Kumar Sangakkara will play his final first-class game when Surrey visit Lancashire next week
Surrey batsman Kumar Sangakkara told BBC London:
"I can't ask for any more. Forget the hundred, but to win, that was outstanding. I never really planned a farewell like this. But to walk off with a win, I can't describe how special that is.
"The atmosphere in the dressing room has been fantastic all season, but especially in this game. I've been made to feel so welcome, to feel part of the family. I'm just happy I could repay them with some performances.
"It has rekindled that passion that I thought I'd lost. When I get on a stretch where I'm scoring runs, I've been able to repeat that process over and over again.
"Coming here I wanted to see an improvement as me in a player, but also in Surrey as a side and what's giving me the most satisfaction is watching how the senior players have led this group from being in the second division to being a force in the first division."
Somerset captain Tom Abell:
"When you are playing against Sanga you can see the genius of the man. It looks like he is playing a different game at times. It's not nice being on the wrong end of things against him.
"It was a real battle today and I think we've bowled as well as we have all season in this game.
"Things just didn't seem to fall our way, but you couldn't fault the effort of our guys.
"Next week is a cup final now. If we beat Middlesex we have a chance of staying up."
(BBC)