Yorkshire enjoyed a superb first half of day two with the ball before battling hard with the bat as the ongoing Specsavers County Championship relegation battle at Emerald Headingley reached its halfway stage.
Jack Brooks starred with 5-66 from 17 overs as Lancashire, replying to a first-innings 209, slipped from 105-0 and later 145-1 to 252 all out, a visiting lead of 43.
Yorkshire bowled a more probing line on day two than they did after tea on day one and got their rewards as a result.
The White Rose then slipped to 27-3 second time around just after tea before recovering to reach close at 127-3 from 44 overs through Gary Ballance and Tom Kohler-Cadmore. They lead by 84.
Both sides will be able to make a case for holding the advantage at this stage, but it can only be a marginal one in a fascinating and hard-fought contest which swung this way and that during the course of the day.
Brooks struck three times in a morning which brought the White Rose four wickets and saw Lancashire only add 60. During the afternoon, the Red Rose fell from 165-4, although just pinched a second batting bonus point.
Day two, delayed by 15 minutes following overnight rain, started perfectly for Yorkshire, with Ben Coad getting Karl Brown (43) caught behind down leg-side with the first ball of the day.
Brooks then had Steven Croft caught at second slip, leaving the score at 145-2 in the 48th, before nipping one back at Liam Livingstone to bowl him four and a half overs later.
And when he trapped Dane Vilas lbw for a duck, Lancashire were 157-4 in the 56th and slipping.
Brooks claimed his fourth and fifth wickets early in the afternoon.
He trapped Alex Davies lbw in his first over after lunch – the second in all – for 87 before getting Josh Bohannon the same way.
Either side of Tim Bresnan getting Danny Lamb caught behind, Matthew Waite added two cheap wickets.
He had Tom Bailey caught behind and Graham Onions bowled as the score fell to 221-9.
But South Africa Test left-arm spinner Keshav Maharaj frustrated Yorkshire as he clubbed three leg-side sixes in a brisk 38 to push the visitors beyond 250.
Bailey and Onions then removed Yorkshire openers Jeet Raval and Adam Lyth in successive overs as the score fell to 19-2 in the eighth.
Bailey had New Zealand overseas left-hander Raval (10) lbw before Onions had Lyth caught behind.
Then, five balls after tea, Bailey bowled Harry Brook as he pushed forwards to one which kept low, with Yorkshire now 27-3 in the 13th over.
But Yorkshire moved into the lead thanks to fourth-wicket pair Ballance and Kohler-Cadmore, who have scored four of the county’s five Championship centuries this season.
Both passed 100 in last week’s draw against Notts at Trent Bridge, while Kohler-Cadmore hit a brilliant 105 not out in the first innings of this clash.
The pair brought up their half-century stand inside the final 10 overs of the day, with the miserly spin of Maharaj a threat.
Ballance reached 107-ball fifty with a little over two overs remaining, and the century stand was recorded in the final over of the day.
Ballance will begin day three on 53 and Kohler-Cadmore 42.