Surrey beat Gloucestershire by two wickets despite Mark Ramprakash being given out for obstructing the field on the final day at Cheltenham.

Having made 35, Ramprakash was adjudged to have impeded Ian Saxelby at the bowler's end with Jason Roy trying for a second run at 137-4, chasing 184.

Zafar Ansari fell lbw to Jon Lewis for a duck and Gareth Batty and Roy were also out, setting up a tense finale.

But Yasir Arafat and Tim Linley (six not out) saw them over the line.

The hosts began the day on 249-4 in their second innings, leading by 112, but soon lost Alex Gidman (66), Richard Coughtrie (16) and Will Gidman (20).

Ramprakash waved his bat in the air as if he were going to block the ball. He didn't, but the action distracted me and that is why we appealed

Ian SaxelbyGloucestershire paceman

Linley finished with seven victims in the game for 136 runs as he accounted for Jack Taylor (10) and Gloucestershire were bowled out for 320 soon after lunch.

Rory Hamilton-Brown and Steve Davies put on 50 for Surrey before the latter was caught behind fending at Will Gidman for 19.

It was 60-2 when Hamilton-Brown (39) was taken at first slip by Alex Gidman off Lewis and 80-3 when off-spinner Taylor struck in his first over, having De Bruyn pouched by Hamish Marshall at slip for 11.

Tom Maynard fell lbw to David Payne for two, and at 85-4 the game was there to be won for either side.

Ramprakash looked composed with his 35 before his controversial dismissal, where he started walking off but returned to talk to umpires George Sharp and Nigel Llong before eventually leaving.

Surrey were stuttering, with Ansari going, Batty (eight) being taken well at first slip and Roy (45) edging Lewis - - to wicketkeeper Coughtrie after six fours for 64 balls.

But despite some more scares, Arafat and Linley survived, with the latter hitting the winning runs.

Of the game's main talking point, Saxelby said: "Ramprakash waved his bat in the air as if he were going to block the ball. He didn't, but the action distracted me and that is why we appealed."

Surrey cricket manager Chris Adams said: "It was a big call and it looked pretty innocuous from the sidelines. Mark is upset and very disappointed that the umpires felt he deliberately set out to obstruct the field.

"The laws of cricket are there and sometimes umpires see things one way and you see it another. At the end of the day it is their decision that counts.

"It was all rather bizarre and confusing. We were disappointed because Mark was playing beautifully in a high-pressure situation."

Gloucestershire skipper Alex Gidman said: "I have never seen a dismissal like it before.

"From where I was standing I just saw the bat go up, but the other lads saw what line it was on and felt it put Sax off gathering the ball."