SHAUN Marsh gave Yorkshire the perfect leaving present and Alex Lees put a frustrating season behind him as the pair completed final-day centuries to secure a crucial draw against Surrey at The Oval.

Defeat would have left Yorkshire in the Division One relegation zone with two Specsavers County Championship matches remaining.

As it is, the five points gained for comfortably batting out day four and ten points earned in all keeps them beyond Somerset and Middlesex – but only just.

Asked to follow on 198 runs behind replying to 592, Yorkshire closed on 281-2, with bad light ending play just one over after tea.

Marsh finished on 125 not out from 263 balls with 17 fours, while Lees hit 14 in his 201-ball 102.

The county go into Tuesday's final home match of the season against Warwickshire at Headingley in fifth place on 124 points, with Somerset and Middlesex both on 123.

Defending champions Middlesex are in the relegation zone in seventh place courtesy of having won two matches to Somerset's three.

Somerset beat Lancashire at Taunton this week, while Middlesex drew with Hampshire at Uxbridge.

Yorkshire coach Andrew Gale said: "There's so many teams down there who can go down. Surrey aren't out of it just yet.

"We've got two massive games to come but the key is not to look at the table and perform with the bat like we have done here."

Yorkshire started day four on 59-1 in their second innings and it was quickly clear they would avoid defeat as left-handers Marsh and Lees looked in little trouble on a lifeless pitch.

They completed a second-wicket partnership of 215 in 67 overs from late evening on day three to mid-afternoon on day four, a Yorkshire record against Surrey.

Marsh advanced from 27 not out overnight and Lees 19 to reach their centuries in successive afternoon overs.

In his second and final Championship game before returning home to Australia, Marsh went beyond 50 for the second time in the match, having posted 78 in the first innings. He reached three figures in 226 balls.

For Lees, this was his first hundred and only his third time to 50 in four-day matches this season. He reached his ton off 197 balls.

Both players were watchful during the morning as they added 97 runs to reach 156-1 at lunch.

The pair notched their 150 partnership shortly after lunch and Surrey knew they would have to bat again not too long afterwards. At that stage, the score was 200-1 with 50.3 overs remaining in the day.

Even the loss of Lees, who played on to Freddie van den Bergh's left-arm spin to leave the score at 239-2, did not cause alarm, skipper Gary Ballance adding an unbeaten 28.

Gale said: "I'm really pleased with the last three days of that game. The first day I thought we we were well below par. I thought we were poor.

"But we fought our way back well and the most positive thing was that we backed up last week.

"I felt we turned the corner with the bat and we've had two innings there where I thought we played really well."

Meanwhile, Gale revealed that Ryan Sidebottom is a doubt to face Warwickshire, having sustained a quad muscle injury while fielding earlier in this match.

The veteran bowler will have a fitness test on Monday and Gale described his chances of playing as "50-50".