Lancashire lost to Warwickshire in a relegation battle at Edgbaston, but stayed in the top flight of the County Championship when rivals Hampshire lost to Durham.
So Lancashire stayed up on a dramatic afternoon and Hampshire go down from division one.
Warwickshire secured their own status for another year by completing a thumping 237-run win over the Red Rose county at Edgbaston.
Chasing a notional victory target of 347 at Edgbaston, Lancashire were bowled out for 109 early on the final afternoon, their batting pared away by relentlessly accurate bowling led by Rikki Clarke (10.5-3-20-4), Jeetan Patel (24-11-46-3), and Chris Wright (14-8-8-2).
By banking their first home championship win of the season at the last attempt, Warwickshire preserved the elie status they have held unbroken since 2009.
But Lancashire were left facing a tense wait for tidings from Southampton and the outcome of the match between Hampshire and Durham.
Had Hampshire won, they would have stayed up and Lancashire relegated.
However, Durham did Lancashire a favour by winning by six wickets.
Lancashire resumed on the final morning on 28 for three, needing to execute a massive rearguard action, and they started in determined fashion as overnight pair Haseeb Hameed and nightwatchman Simon Kerrigan survived for 50 minutes.
But Wright made the vital breakthrough when Hameed (27, 78 balls, four fours) was brilliantly caught by Clarke, low to his left, at second slip.
Clarke then struck with his first ball from the Pavilion End, which Croft bat-padded to Sam Hain at short-leg. When Liam Livingstone edged Patel to Jonathan Trott at second slip, Lancashire were in deep trouble.
Kerrigan showed exactly the sort of resolve his team needed, batting throughout the morning session for ten runs, but his excellent resistance was terminated quickly after lunch. Having made ten from 117 balls (no fours, no sixes) the nightwatchman edged Patel to Clarke at slip.
Clarke then delivered pacy, full-length inswingers to send Jordan Clark’s off-stump flying and rattle Tom Bailey’s middle and off-stumps to leave Lancashire last pair Arron Lilley and Kyle Jarvis with 58 overs to survive.
Lilley smote Patel for three fours and a six in an over which cost 20 but when Jarvis poked Clarke to Ian Westwood at silly point, Warwickshire’s inconsistent season ended on a high and in safety - while Lancashire settled in for that tense wait.
Reflecting on an eventful final day of the season, Lancashire director of cricket Ashley Giles said: “There was no lack of trying or commitment from the guys, but we were beaten by a better team.
“Warwickshire are a side which has probably not played very good cricket this year but they are a very good and experienced team.”The wicket was dry and started to wear and Jeetan Patel is the best spinner in the country so it was going to be tough.
“But I have got no problem with my lads, I have just thanked them in the dressing-room for their efforts this year. But we have got to get better quickly.
“Not winning more games has cost us so we have only got ourselves to blame.
“We have played in some tight games which could have gone either way but overall if you don’t win games of cricket you are going to be behind the eight-ball.
“We have blooded some really good youngsters and put in some really good performances.
“I’m sure this group will be better for this experience next year.”