Nick Gubbins hit a brilliant 124 from 145 balls but he and Peter Handscomb were cruelly denied by the weather after looking as if they were going to sweep Middlesex to a dramatic last day victory against close rivals Surrey at the Kia Oval.

In the end Middlesex could only reach 250 for 6, a cruel 40 runs short of their win target when time ran out, with Kemar Roach finishing with 5 for 86 as four wickets tumbled in a desperate late bid to score what became 74 from eight overs, rather than 13.

That equation changed because of a rain delay of 20 minutes from 5.55pm.

Middlesex had been sitting pretty on 216 for 2, after being set 290 from an initial 71 overs when Surrey declared their second innings on 259 for 2 with Rory Burns scoring 104 not out and Ollie Pope a cameo unbeaten 37 from 20 balls.

Nine mid-afternoon overs had also already been lost to rain but, from 47 for 2, Gubbins and Handscomb had met the run-chase challenge in a cool and controlled partnership of 172 that featured some high-class batting from both players on a still excellent surface.

On the resumption, at 6.15pm, Handscomb was almost immediately caught on the cover ropes for 70 and although Gubbins swung Roach for a defiant six their hopes ended when the left-hander hit the West Indies paceman to deep extra cover.

Both counties took 11 points from the LV= Insurance County Championship draw, with Surrey remaining fourth in Group 2 and Middlesex fifth of the six-team conference table.

Gubbins batted beautifully and has now scored 455 runs this season, while Middlesex captain Handscomb put a wretched five weeks of poor form – 60 runs from eight innings – behind him in what was a triumph of character for the Australian.

Jack Davies, close to being lbw to a Roach near-yorker, was earlier well caught in the gully by Pope off a leading edge for two as he tried to work Roach towards mid-on and Sam Robson’s solid 32 ended when Reece Topley was recalled for the 17th over and his third ball, angled across the batsman, was nicked to second slip.

Surrey batted on for 100 minutes, adding 124 to their overnight 135 without loss and Burns completing his first hundred of the championship season, after six half-centuries in his previous nine innings.

The England Test opener has now scored 554 runs at 61.66 this season and looks in good order ahead of the two-match series against New Zealand in early June.

Mark Stoneman fell to the day’s third ball, nicking Ethan Bamber behind without addition to his overnight 74. His opening stand of 135 with Burns was the equal highest identical opening partnership in first-class cricket, matching the two 135s put on by Sussex openers Kepler Wessels and John Barclay against Somerset at Hove in 1979.

Hashim Amla then reached a useful 43, once picking up Tim Murtagh’s medium pace for six over long leg, before skying the same bowler to deep mid-wicket, while Pope took two sixes and a four from one Murtagh over.

Gubbins said: “We just tried to play the long game. We didn’t go out there with the intention of chasing down that total but as the partnership with Peter grew we knew we were in with a sniff.

“Those five overs being lost to rain changed things a lot, though, and it made it very difficult for us. We had a crack at it, but in the end I think the draw was probably a fair result overall.

"It’s frustrating, of course, but after today we can take a lot of positives from our performance.”