A rugged career-best of 122 from Leicestershire opener Matt Boyce meant Yorkshire had a long and anxious wait at Scarborough before registering their first victory of the season by an innings and 22 runs on the final day of the LV=County Championship match.
Boyce's century came off 250 balls and was the slowest of the season in terms of deliveries received, and it held up Yorkshire until 3.45pm before they could claim the 23 points which lifted them up the Second Division table.
Steve Patterson took five for 77 to finish with career-best match figures of eight for 94 as Leicestershire, following-on after making 116 in their first innings, were all out for 309 second time around.
Yorkshire must have envisaged few problems ahead when the visitors resumed their second innings on the final day on 102 for three - still 229 runs in arrears - but Boyce and Josh Cobb continued to show the same sort of fighting qualities that they had displayed the previous day.
They soon built steadily on their overnight stand of 88 for the fourth wicket and were rarely troubled by the opening pair of bowlers, Anthony McGrath and Adil Rashid.
Both batsmen completed their half-centuries as the stand moved into three figures in 40 overs of careful application and it was 63 minutes into the session before Patterson, having replaced Rashid, dismissed Cobb lbw for 69 from 152 deliveries with 11 fours.
Yorkshire's spirits rose still further three overs later when Tim Bresnan bowled Ned Eckersley round his legs to make it 149 for five.
However, another morale-boosting stand for Leicestershire developed between Boyce and Wayne White, who showed an early appetite for boundaries by playing Patterson off his toes to the square leg boundary and striking him through the covers for four.
Boyce was on 82 not out at lunch and for a while after the interval Yorkshire employed an all-spin attack in Rashid and Joe Root until the new ball became available.
The return of the pacemen did not cause any undue concern, apart from Boyce surviving a confident shout for lbw against Sidebottom, and other landmarks quickly came and went.
White's fifty was recorded off 76 balls, with eight fours and a six, and Boyce moved to his fourth first-class century with 11 boundaries, the leg-glance at Sidebottom which brought it up also making it a century partnership.
Yorkshire were being put under increasing pressure as the possibility of Leicestershire going into the black took hold and Boyce recorded his career-best score once he had gone beyond the 119 he made against Gloucestershire last summer.
It needed the return of McGrath to break the stand after 133 had been added in 33 overs, White driving back to the bowler after making 67, and suddenly the floodgates were open.
In the next over, Sidebottom found himself on a hat-trick as the tenacious Boyce was yorked after receiving 269 balls and striking 15 fours and Rob Joseph fell lbw. Nadeem Malik came in and Sidebottom's first delivery missed the off-stump by a whisker.
Nadeem Malik hung around for a while before Rashid had him lbw and the game ended when Claude Henderson was caught in the slips to give Patterson his five-for