Surrey moved away from the Division One relegation zone with an eight-run win over Middlesex on the final day at The Oval.
Middlesex resumed on the fourth morning on 45-1 in pursuit of a victory target of 254.
Surrey spinners Gareth Batty (6-83) and Murali Kartik (3-91) combined to reduce the visitors to 142-7 at lunch.
Steven Crook's boundary-laden 67 revived Middlesex's chances before last pair Toby Roland-Jones (17) and Tim Murtagh (25no) reduced the requirement from 57 when they came together to single figures.
But Surrey skipper Batty claimed his sixth wicket just in time, winning an lbw verdict against Roland-Jones to finish the contest.
Surrey earn a 19-point haul for their second win of the season and have increased the gap between themselves and the bottom two, Lancashire and Worcestershire, who are heading for a draw at New Road.
Centuries from Rory Burns and Arun Harinath, plus a late wicket for Gareth Batty, left the clash between Surrey and Middlesex intriguingly poised with a day to go.
Set 254 to win the crucial LV= County Championship encounter at the Oval, Middlesex lost skipper Chris Rogers for 19 as they reached 45-1 at the close, Sam Robson finishing up unbeaten on 22.
Surrey had been given hope by a second-wicket stand of 217 between Burns and Harinath that wiped out a first-innings deficit 88 and carried the home team into the lead.
The partnership eventually came to an end when Harinath fell to Steven Crook (3-93) for 109, his maiden first-class century. It was also the first of nine wickets to go down for 111 runs.
Burns was next to go for a well-made 121 from 238 deliveries and although Zander de Bruyn (23) and Steven Davies (44) made useful contributions, Surrey's innings subsided from such a promising position.
Toby Roland-Jones took 5-39 from 24 overs to finish with impressive match figures of 8-77, though Middlesex will have to return on Saturday and score another 209 runs to win the London derby.
Murali Kartik claimed 5-69 to bowl Surrey back into contention on day two of their London derby against Middlesex at the Oval.
The India spinner sparked a Middlesex collapse from 164-3 to 188-9 before Tim Murtagh and Toby Roland-Jones lifted the visitors to 232, giving them a vital 88-run first-innings lead.
Middlesex had begun in the morning on 99-1 but lost Sam Robson to the fourth ball of the day and then Joe Denly for 17 - caught at the wicket off the bowling of Tim Linley.
Nightwatchman Tom Smith contributed 31 but his departure to Kartik began a clatter of wickets, with Gareth Batty also picking up two scalps.
However Murtagh smacked 26 from 33 deliveries alongside Roland-Jones, who finished up unbeaten on 17 before going on to pick up the wicket of Surrey opener Zafar Ansari for a duck.
Rory Burns and Arun Harinath then cut the overall deficit to just two runs, though, putting on an unbroken 73-run stand in the final session to see the hosts reach the close on 86-1.
Tim Murtagh and Chris Rogers ran through the Surrey batting line-up as Middlesex took a firm grip on their Division One clash at the Kia Oval.
Murtagh took 5-37 against his former county as Surrey, after opting to bat first, were skittled out for 144, with only Jason Roy putting up any resistance with an unbeaten 55.
Rogers, the former Australia batsman now captaining Middlesex, then struck 56 and teamed up with his opening partner Sam Robson to add 98 for the first wicket in reply.
At the close Middlesex were only 45 runs behind on 99-1, Rogers falling in the penultimate over when he was yorked by Jade Dernbach.
Robson, who batted with a determination that none of Surrey's top order could match throughout 32 overs, remained 24 not out alongside nightwatchman Tom Smith.
Both London teams won promotion to Division One last year, but while Middlesex are in a safe mid-table position going into the last month of the season, Surrey are prime candidates for relegation in seventh place with only 12 points separating the bottom four counties at the start of this round of games.
Opting to bat first was clearly meant to show positive intent by Surrey, but in overcast conditions it backfired spectacularly against a Middlesex seam attack led superbly by Murtagh and Toby Roland-Jones, who finished with 3-38.
At 73-6 Surrey were struggling to reach three figures, although Roy and Murali Kartik managed to put together a defiant stand of 41 before Murtagh was recalled to bring a swift end to the innings.