A career-best of 122 from Leicestershire's Matt Boyce was not enough to deny Yorkshire victory by an innings and 22 runs on the final day in Scarborough.
The hosts were given a long and anxious wait by the opener, who remained at the crease for almost six hours during his 259-ball innings, before they could celebrate their first victory of the season.
Following on and still 229 behind on 102-3, Yorkshire must have envisaged few problems ahead but Boyce and Josh Cobb continued to show the fighting qualities they had displayed the previous day.
It was 63 minutes into the session before Steve Patterson dismissed Cobb lbw for 69, and soon after Tim Bresnan bowled Ned Eckersley round his legs to make it 149-5.
But another morale-boosting stand developed between Boyce and Wayne White, adding 133 in 33 overs before Anthony McGrath broke the resistance when White drove back to the bowler after making 67.
Sidebottom found himself on a hat-trick after dismissing Boyce and Rob Joseph in successive balls but it was left to Patterson to wrap things up and finish with career-best match figures of 8-94, after taking 5-77 in Leicestershire's second innings.
Yorkshire were held up by Leicestershire batsmen Matthew Boyce and Josh Cobb on day three at a bitterly cold Scarborough.
The fourth-wicket pair added an unbroken 88 together before Leicestershire closed on 102-3, the grim conditions having allowed for only 37 overs in the day.
The Foxes resumed in the morning on 3-1, still 328 runs in arrears, and a quick end loomed more likely when Jacques du Toit was caught in the covers by Joe Sayers off Steve Patterson in the second over.
But rain and murky light soon brought the players off and the interruption lasted until 3.30pm at which stage 43 overs had been lost.
Then Patterson struck again by getting Ramnaresh Sarwan lbw pushing half-forward and at 14-3 the end may not have been far away if Boyce (46 not out) and Cobb (45 not out) had not defied both the Yorkshire attack and the weather.
The pair made sure if unspectacular progress before a wintry mix of rain and sleet caused a further nine overs to be lost at 5.40pm, and on the resumption there was just time for Cobb to hit Adil Rashid to the mid-wicket boundary to take Leicestershire into three figures.
Leicestershire are on the brink of defeat inside three days after being forced to follow on by Yorkshire in their division two championship match.
The Foxes suffered a shocking batting collapse in Scarborough after Jonny Bairstow had advanced his score to 182 in Yorkshire's first innings effort of 447.
Only Josh Cobb (29) got any sort of start as Leicestershire were bowled out for just 116 before opener Greg Smith lost his wicket to Steven Patterson for the second time in the day before stumps, as they finished on 3-1 second time round.
Anthony McGrath, only in the side because of the county's abrupt fall-out with Ajmal Shahzad, scored 90 and then had figures of 4-21 to aid the visitors' downfall.
McGrath resumed on 49 and took his partnership with Bairstow to 159 before the latter slapped Wayne White to cover to depart for a dazzling 182 off 259 balls with 19 fours and four sixes.
McGrath emerged from Bairstow's shadow to suddenly open up by straight-driving Claude Henderson for six, but his bid for a century ended soon after the lunch interval when he pushed forward at Claude Henderson and was caught behind.
Leicestershire then stuttered from the start, going to 33-3 and then 64-6, Ryan Sidebottom picking up the first two wickets while Patterson claimed three after removing White and Robbie Joseph.
Henderson and Nadeem Malik survived several anxious moments while pushing the score into three figures but Henderson's edge to Phil Jaques at third slip brought Bresnan his third wicket and then McGrath was recalled to wrap things up by dismissing Alex Wyatt with his second delivery
Jonny Bairstow scored an unbeaten century as Yorkshire recovered from a shaky start to their LV= County Championship match against Leicestershire.
Bairstow finished on 141 not out as the hosts reached 329-5 at Scarborough after being put in, the young wicket-keeper adding 160 with skipper Andrew Gale after Yorkshire were rocking on 33-3.
Joe Sayers was the first to fall, failing to get going and dropped twice before being trapped lbw by Robbie Joseph for eight in almost an hour at the crease.
Phil Jaques and Joe Root both fell on the same score - Jacques lbw to spinner Claude Henderson and Root caught by Matt Boyce off Wayne White's first ball in the next over.
That brought Gale and Bairstow together, and the pair steadily rebuilt the innings after Gale was dropped by Ramnaresh Sarwan at slip, before the captain edged White to 'keeper Ned Eckersley having made 80, with 10 boundaries.
Bairstow, who also had a life when Jacques du Toit grassed a chance at slip off Alex Wyatt, gradually warmed to his task and after losing Gary Ballance for 10 proceeded to take the game away from the Foxes with an unbeaten stand of 112 with veteran Anthony McGrath.
The former captain was left on 49 not out at stumps having already struck nine boundaries. But the day belonged to Bairstow, whose century came up in 176 balls as Yorkshire closed on maximum batting bonus points.