County Championship D1, The Oval (day two, stumps)
Middlesex 404-5 dec v Surrey 462-4
Surrey were relegated from County Championship Division One for the first time after missing a vital bonus point against Middlesex at The Oval.
In the process, Middlesex secured their place in the top tier of the four-day competition for another year.
But Mark Ramprakash set about restoring pride with an unbeaten 200 to give the home side a lead of 58 runs.
Ramprakash shared stands of 178 with Jon Batty (73) and an unbroken 145 with Azhar Mahmood, who was 78 not out.
The hosts began the day 59-2, needing to reach 400 without losing a further wicket to secure enough bonus points.
But Scott Newman was lbw for 51 to Indian spinner Yogesh Golwalkar to consign Surrey to their fate.
Surrey, champions three times between 1999 and 2002, have been in the top division since the Championship was split in 2001.
New coach Alan Butcher said they had lost the team spirit that brought them those three titles.
"We have got to get back to the same group ethos we had five or six years ago," Butcher said.
"There are players coming to the end of their careers and we need to address that - it is something we have been aware of for a little while.
"But if we can keep some of the players we have fit there is still enough quality in this squad."