The Red Rose county, in severe danger of dropping out of Division One, suffered a nightmare final hour of day three as they slipped from 66-2 to 95-7 chasing 230. They added a further 14 before the close without further damage as Coad finished with 4-14 from 10 overs.
Yorkshire, trailing by 43 on first innings, resumed their second innings on 127-3, a lead of 84.
Seamer Tom Bailey finished with four wickets to bowl Yorkshire out for 272 to signal an early tea and leave the Red Rose with 38 overs to face.
Gary Ballance and Tom Kohler-Cadmore completed a superb fourth-wicket stand of 148 to drag the White Rose back into the contest from 27-3. Ballance top-scored with 85 and Kohler-Cadmore made 63.
They were two of three wickets to fall in the morning session, and from there the hosts were unable to build any sustained momentum against an accurate attack, highlighted by Bailey and South Africa left-arm spinner Keshav Maharaj.
Bailey finished with 4-69 from 29 overs and Maharaj 3-52 from 32. Graham Onions took two wickets and Blackpool’s Richard Gleeson one to add to his three first-innings victims on his Lancashire debut.
Onions is the division’s leading wicket-taker with 57 and Bailey second with 56.
Kohler-Cadmore was lbw pushing forwards at Maharaj. Ballance followed the same way as Yorkshire slipped to 192-5.
Just before lunch, Bailey had Jonny Tattersall caught behind for 22 as the score fell to 214-6.
Yorkshire’s inability to break free was partly down to the pitch slowing up, although just prior to the last wicket falling the hosts took 12 off one Bailey over. Prior to that, Matthew Waite was lbw to Onions before Steve Patterson lost his off-stump to Bailey.
Tim Bresnan then chipped a return catch to Maharaj for 20 and Gleeson wrapped up the innings when Brooks edged him to slip.
Coad gave Yorkshire an early boost with the wicket of Alex Davies, who was caught behind to leave Lancashire at 11-1 in the fifth over.
And when Bresnan removed Karl Brown lbw it was 31-2 in the 12th.
Brooks then struck twice in successive overs in the final hour of the day to give Yorkshire a definite advantage as Lancashire fell to 81-4.
Steven Croft pulled him to mid-wicket before Liam Livingstone (28) lost his off stump to one which kept low.
That advantage became a stranglehold with three wickets in eight balls for Coad. He bowled Dane Vilas and Tom Bailey, and trapped Danny Lamb lbw.
Lancashire started the game third from bottom and one point above their arch-rivals, though Yorkshire have two more games after this and the Red Rose only one.