The win helped them take a giant step towards safety in Division One.
The White Rose county comfortably defended a target of 230 to beat Lancashire by 95 runs and leave their arch-rivals in grave danger of relegation.
Lancashire were bowled out for 134 in their chase within the first 40 minutes of day four.
Breidyn Schaper sparkles with the bat as Scarborough CC experience mixed weekend
Folkton & Flixton CC net fifth YPLN Championship win in a row on the road at Easingwold
Scarborough Athletic's home National League North campaign off to a winning start against Hereford
PHOTO FOCUS - 17 photos from Scarborough CC v Sessay CC by Simon Dobson
Mulgrave CC take step closer to Scarborough Beckett Premier title
Both sides will have to wait until fixtures involving Worcestershire, Essex and Nottinghamshire, the latter two who are playing each other at Trent Bridge, finish later today before they know their exact situation in the table.
But it could be that Yorkshire need as little as 18 points from their remaining two games to secure top flight cricket for next season.
Lancashire only have one game remaining.
They have replaced Yorkshire in the relegation places and are now second bottom.
If, as looks likely, Essex beat Nottinghamshire at Trent Bridge, Lancashire will not be able to be mathematically relegated next week when they have no fixture.
Ben Coad finished five for 24 from 15.1 overs, while Jack Brooks added four in the innings and nine in the match.
Lancashire will be mightily frustrated at letting a position of strength in this game slip, and they have not won a Roses Championship match since 2011 - a run of eight fixtures, of which Yorkshire have won five.
At the end of day one, Lancashire were 105 without loss replying to Yorkshire’s first-innings 209. From then on, the White Rose dominated the game on the way to a fourth win from 12 in Division One this season.
Having started their chase of 230 immediately after tea on day three, Lancashire had reached 66 for two before slipping into disarray at 95 for seven.
Coad claimed four for 14 from 10 overs, including his second, third and fourth scalps in an eight-ball spell.
That left Josh Bohannon and Keshav Maharaj with a mountain with an unenviable task at the start of day four.
Maharaj crashed the first ball of the day from Coad for four through the covers, but he fell in the fourth over of the morning when bowled by Brooks for 18, leaving Lancashire at 122 for eight in the 42nd.
Brooks claimed his fourth wicket of the innings when he bowled Graham Onions at the end of the 48th over before Coad wrapped things up by getting Bohannon sharply caught at mid-wicket by Tim Bresnan at the second attempt at the start of the 49th - two wickets in two balls.
Having beaten Lancashire at Emirates Old Trafford in late July, this was Yorkshire’s first Roses double since 2001.