Middlesex 172 (Shaw 4-33) and 244 (Roland-Jones 51*, Higgins 4-35) beat Gloucestershire 201 (Higgins 61*, Roland-Jones 7-52) and 137 (van Buren 57*, Murtagh 5-44) by 78 runs
Tim Murtagh grabbed his fourth five-wicket haul in the County Championship this season as Middlesex rolled Gloucestershire over for 137 to clinch victory inside three days at Merchant Taylors' School.
Chasing 216, Gloucestershire were blown away by a three-wicket burst from the veteran seamer, who then returned to break a stubborn eighth-wicket partnership and secure only his side's second Championship win of the campaign.
In between Murtagh's spells, Tom Helm and Toby Roland-Jones - who had earlier dragged their side out of the mire with their partnership of 99 - ripped through the middle order as Gloucestershire crashed to 40 for 7. Graeme van Buuren defied the home side with a feisty unbeaten half-century, his first of the season, but Roland-Jones finished Gloucestershire off, recording match figures of 10 for 79 to seal victory by 78 runs.
Resuming their second innings at 96 for 3, Middlesex's prospects of victory appeared to have taken an immediate blow as Dawid Malan departed to the first ball of the day, a rising delivery from Josh Shaw that brushed his glove and flew through to Gareth Roderick.
The ball continued to fizz off the surface, making it hard work for the batsmen and George Scott took a nasty blow on the hand when another Shaw delivery spat. Scott eventually fell to Chad Sayers, with Benny Howell snapping up the slip catch after James Bracey had palmed it up, and Ryan Higgins completed his best figures of the season by having Robbie White caught behind.
When David Payne trapped John Simpson lbw, Middlesex were deep in trouble at 124 for 7, with an overall lead of just 95. But Roland-Jones and Helm turned the tide as they set a Middlesex record for the eighth wicket against Gloucestershire.
Both batsmen adopted an attacking approach, frustrating Gloucestershire to the extent that they finally turned to the spin of Van Buuren after 145 overs of uninterrupted pace bowling. However, it was Payne who took the new ball and struck almost immediately by having Helm caught in the slips, just after Roland-Jones had reached his first Championship half-century since September 2017.
He remained unbeaten as Sayers cleaned up the Middlesex innings for 244 with the wickets of Nathan Sowter and Murtagh, leaving the visitors to chase 216 for victory.
They made the worst possible start, though, as Murtagh removed skipper Chris Dent, caught at third slip, with the first ball of the innings. The Ireland international struck again twice before tea, overtaking Wayne Daniel in the all-time list of Middlesex's most prolific bowlers as he dismissed Bracey, who was leg before without playing a shot.
Miles Hammond, who had survived an earlier lbw appeal, was next to go as he edged to Stevie Eskinazi in the slips - and Gloucestershire's dramatic slide continued to gather pace after the interval. Wicketkeeper Simpson sprang to his right to remove Roderick off Helm, who claimed his second victim when Ben Charlesworth edged to third slip, while Howell and Higgins both fell to Roland-Jones.
Payne helped Van Buuren add 51 for the eighth wicket, but Murtagh returned to uproot his leg stump and then had Shaw caught behind before Roland-Jones rounded off his side's success.