Lancashire ended Hampshire’s hopes of a first title since 1973 with a thrilling one-wicket victory at Aigburth.
Tom Bailey returned career-best figures of 7-37 as Hampshire were all out for 196, having begun day three on 158-7.
Alex Davies (44) gave the Red Rose county a positive start and captain Dane Vilas (47 not out) saw them to 198-9 despite Mason Crane’s 5-41.
Lancashire will become county champions if Warwickshire are unable to beat Somerset at Edgbaston on Friday.
When the Bears failed to take maximum bowling points in Somerset’s first innings, it opened the door for Hampshire to clinch the title with victory over Lancashire.
But their attack, minus leading wicket-taker Kyle Abbott because of injury, could not quite finish the job and earn a second trophy of 2021 for skipper James Vince, who won The Hundred with Southern Brave.
Lancashire have won the title outright on seven occasions, most recently in 2011, and also shared the title with Surrey in 1950.
In an astonishing finish to the match, they seemed to be cruising towards their target at 177-5 but then lost three wickets for 16 runs, including Bailey, who was run out by Crane as Vilas called him for a single.
With only three more needed, Jack Blatherwick came out at number 10 to face Liam Dawson and inexplicably pinched the strike for the next over with a single from the final delivery.
Facing Crane, Blatherwick blocked out three balls but then edged to second slip, leaving last man Matt Parkinson to survive the rest of the over, which he did.
And that cleared the way for Vilas to sweep Dawson for four to put paid to the possibility of a tie and end both the match and Hampshire’s dream of a third title.
Earlier, pace bowler Bailey helped finish off Hampshire’s second innings with two of the three wickets to fall and Davies and George Balderson then launched the run-chase with a 55-run partnership either side of lunch.
Balderson was bowled behind his legs by Dawson and Davies caught at cover off Keith Barker in successive overs and there was another double setback for Lancashire when Josh Bohannon and Luke Wells departed just before tea, which they reached on 118-4.
Vilas, however, stood firm, and despite the sudden flurry of wickets by leg-spinner Crane, kept the home side in the title picture and put all the pressure on Warwickshire.
Lancashire now have 73.5 points and if Warwickshire – who lead Somerset by 157 runs – fail to win and become champions, Nottinghamshire can snatch second place by beating Yorkshire at Trent Bridge, where they have been set a target of 174.