Paceman Jack Holt took five wickets and opener Oliver Stephenson hit a superb ton as Scarborough earned their first-ever Yorkshire Premier League North win at Dunnington.
The visitors secured the win with three balls and three wickets to spare, chasing down the home side's 251-8 from their 50 overs to climb out of the relegation zone.
Skipper Jack Bolam scored 43 and Oliver Sherwood, but Holt's excellent spell of 5-62 from 16 overs kept the total within Scarborough's reach, Theo Smith taking 2-60 from 12 overs.
Stephenson and Darren Harland shared an opening stand of 67 before the latter departed for 17, bringing wicketkeeper Mark Tennant to the crease, and he and Stephenson shared a crucial second-wicket stand of 85 before Tennant was clean-bowled by Joshua Barrett for 37.
James Pick's rapid 26 from 27 deliveries saw he and Stephenson put on 47 for the third wicket to take it to 199-3. Stephenson soon followed for an outstanding 115 from 112 balls including 17 fours, and when Alex Carrie and Smith departed for a run apiece the visitors had slumped from 199-2 to 213-6.
Krsitian Wilkinson steadied the ship along with Holt, and although the latter was run out for seven, Wilkinson's unbeaten 25 from as many balls, including a four and a six, helped Scarborough to victory from the third ball of the final over, Sam Carver remaining unbeaten on five with him.
Driffield Town claimed a winning draw at home to Hull, Alec Drury bagging a five-wicket haul for the hosts.
The hosts were put into bat by Hull and although they lost the early wicket of in-form Pakistan A batsman Ali Asad for 10 they posted a decent 263, the final wicket falling from the penultimate ball of the final over.
Opener Ben Dobson led the way with a powerful 71 from 67 balls, including 11 fours and two sixes, while number three bat Casey Rudd added 31, the pair sharing a second-wicket stand of 79.
Sam Drury added 22 from 19 balls and skipper Danny Broumpton 46, number eight bat Nick Hardgrave adding a tidy 19.
Jahangir Alam took 5-80 for the visitors.
Openers Andrew Simpson and Matthew Wilkinson put on 105, the latter caught and bowled by Alec Drury for 52 from 54 balls, and although Simpson departed soon after for a gritty 42, also to Alec Drury, Chris Grey added 32, Ross Davey 24 and Tim Appleyard 26 as the away side hung on for 246-9 to frustrate Driffield.
Alec Drury's spell of 5-64, allied to Rudd's 2-33, ensured Driffield claimed a winning draw.