Gloucestershire 296 and 87 for 4 lead Middlesex 242 (Malan 62, Charlesworth 3-25) by 141 runs
Middlesex staged a spirited fightback in the late-afternoon gloom to raise the prospect of victory over Gloucestershire on the final day of the Specsavers County Championship match at the Brightside Ground.
After being bowled out for 242 and conceding a first-innings deficit of 54, the visitors were further frustrated by the loss of 26 overs to bad light on a day when their hopes of remaining on the fringes of the Second Division promotion race were in danger of being utterly extinguished.
But their seam bowlers made up for lost time during the final session, reducing Gloucestershire to 87 for 4, a lead of 141 with six second-innings wickets in hand.
Needing to win this game and then beat second-placed Kent next week to retain any chance of making an instant return to Division One, Middlesex will seek to force the issue in the morning in the hope of setting up a realistic run chase in the afternoon.
But they will first have to find a way past stubborn Gloucestershire opener Miles Hammond, who will resume on 43 not out after defying the visitors for two hours and 45 minutes. He has already negotiated 108 balls and more of the same iron resolve will be required if he is to usher his team to safety on the final day.
If Gloucestershire's intention was to forge a meaningful lead and then declare, they were quickly disabused of the idea during an afternoon punctuated by regular breaks for drizzle and poor light. Sensing an opportunity to put themselves back in contention, Middlesex's battery of seam bowlers took full advantage.
They were aided and abetted by Gloucestershire skipper Chris Dent, who was needlessly run out for three by Nick Gubbins. James Bracey was next to go, James Fuller producing an in-swinger to knock back the left-hander's off stump.
Worse followed for the home side when Benny Howell chipped Tim Murtagh to midwicket and Gareth Roderick departed in identical fashion, held by Dawid Malan off the same bowler. Having seen three top-order batsmen perish in single figures, Gloucestershire were well and truly under the cosh at 59 for 4.
Thereafter, the defiant Hammond and fifth-wicket partner Jack Taylor adopted resolute defence mode to see out the final 11 overs without further mishap, no mean achievement in increasingly challenging conditions. David Payne earlier claimed three wickets in the space of 11 balls to summarily end Middlesex tail-end resistance and put the hosts in a position of strength by the end of a hard-fought morning session.
Resuming on 182 for 7, Middlesex added 60 runs in painstaking fashion before Payne mopped up the tail to finish with figures of 3 for 51. James Harris and Ethan Bamber raised stubborn resistance in an eighth wicket stand of 53 in 25 overs, but the advent of the second new ball proved decisive.
Gloucestershire effected the breakthrough they so badly needed when Harris, having chiselled 35 from 84 balls, offered a return catch to Payne. Fuller came and went quickly, pushing at a length ball from Payne and offering a straightforward catch to wicketkeeper Roderick, while last man Murtagh cut a short-pitched delivery to point without scoring, leaving Bamber high and dry on 27 not out.