Anthony McGrath’s match-winning 76 secured Yorkshire a superb win that boosts their promotion hopes and ends the 126th annual Scarborough Cricket Festival on a high note.
Yorkshire dominated day one as Gloucestershire were all out for 215, Steve Patterson and Azeem Rafiq taking three wickets apiece.
The Tykes lost Scarborough batsman Adam Lyth and Australian Phil Jaques early doors in their reply, but skipper Andrew Gale, 23no, and Joe Root, 24no, steered them to 61-2.
But the elements took control and ruled out two full days of cricket and it looked like day four would be a damp squib, resulting in a draw and a huge anti-climax to the 126th Festival.
But skippers Gale and Hamish Marshall decided that the game should produce a result, and Yorkshire declared their innings before a bizarre period of play ensued.
Gale and Lyth took the new ball and Gloucestershire helped themselves to a lead of 313. Benny Howell’s 83 not out coming from just 34 balls, and Rob Nicol’s 75 from just 26.
Yorkshire started their run chase well before Lyth fell for 40 with Yorkshire on 72-1.
Fellow opener Root followed for 43 and Yorkshire were on 119-2, with the game still in the balance.
Jaques hit 10 fours in his 79, but when he hit a James Fuller delivery into the arms of Ian Cockbain, the momentum looked like it had swung Gloucestershire’s way.
But McGrath stepped up and produced a superb knock, and despite the loss of Gale, Ballance, Hodd, Rashid and Rafeeq, he managed to steer the Tykes to a two-wicket success when he hit a four of Liam Norwell.
Yorkshire remain in the hunt for promotion straight back to division one of the County Championship.