Lancashire celebrated with the Division Two trophy after completing a 104–run defeat of Middlesex at the end of the best game of four-day cricket seen at Emirates Old Trafford this season.

Needing 270 to win, Middlesex were bowled out for 165 with Tom Bailey taking 5-41 in the innings to complete a match return of 10-119. But the visitors' fine contribution to this game continued on the final day when Martin Andersson's career-best 83, also his maiden first-class fifty, prolonged the contest almost an hour into the final session.

Yet the visitors' pursuit had begun atrociously when they lost three wickets for one run in eight balls and were thus 3-3 after 23 balls of their innings.

The first batsman dismissed was Nick Gubbins, who was bowled for one playing no shot to Bailey, and Max Holden was leg before wicket to the medium-quick bowler's next ball.

Although Dawid Malan saved the hat-trick, the Middlesex captain collected a pair next over when his attempted clip to leg off Graham Onions only gave a catch to cover fielder Bailey off a leading edge.

Saqib Mahmood conceded 16 runs, all in boundaries, when Andersson cashed in on four over-pitched deliveries but Onions restored Lancashire's dominance when he had Sam Robson lbw for 14, leaving Middlesex on 55-4 at lunch.

The only batsman dismissed in the afternoon session was John Simpson, who was leg before wicket to Matt Parkinson for five, and Middlesex entered the final session needing 144 off 36 overs, albeit with only five wickets in hand but with both Andersson and James Harris batting competently.

However, any prospects of victory were ended in the five overs after the resumption. Predictably, Bailey struck the first blow when he had Harris caught behind by Vilas for 38, thus ending his 81-run stand for the sixth wicket.

Two overs later the same bowler had Toby Roland-Jones lbw for five and just five balls later Nathan Sowter was caught at slip by Keaton Jennings off Matt Parkinson for a single.

Bailey was not to be denied further success. His dismissal of Cummins, caught behind by Vilas for nine, completed the ninth five-wicket haul of his career, five of which have been secured against Middlesex.

But the honour of taking the last wicket to fall at Old Trafford this season fell to Saqib Mahmood who bowled Andersson when the batsman inside-edged the ball onto his stumps to end his 167-ball innings and preserve Lancashire's unbeaten record.

In the first 45 minutes of the day Lancashire had added 56 runs in 9.5 overs, Parkinson making a career-best 14 and Steven Croft contributing 40 off 67 balls before losing his middle stump to James Harris.

Parkinson had earlier been caught behind by Simpson off Toby Roland-Jones but Lancashire had found run-scoring relatively easy, especially when Miguel Cummins offered Croft several short balls.