Derbyshire 298 (Johnson 68, Poynton 57, Chawla 5-111) and 244 for 8 (Chanderpaul 77*, Slater 59, Chawla 5-97) beat Somerset 103 (Groenewald 5-33) and 438 (Compton 95, Hildreth 81) by two wickets
Shivnarine Chanderpaul has seen it all and pretty much done it all during a career spanning more than 20 years. But seldom, if ever, can his efforts have been more gratefully received than they were here by joyous Derbyshire team-mates and a small band of cheering supporters.
Victory for the visitors, by a nerve-tingling two wickets and with Chanderpaul unbeaten on 74, keeps the Great Escape story alive for a county that started life back in Division One with seven defeats and three draws from their first 10 matches.
They are now out of the bottom two - unlike Somerset, who trail by a point, and Surrey, who are a further 15 behind. And while Derbyshire's next match, against title-favourites Durham, could not be tougher, there is a real of air of optimism around their camp.
"It's a tremendous win," head coach Karl Krikken, who bats and bowls every ball from the sidelines, said. "We felt 240 was a big ask on that pitch but a couple of the youngsters stood up and the main guy, Chanderpaul, took us home.
"Shiv has been superb for us this season without much luck, really. But this was a magnificent innings because he shepherded us all the way."
Had Chanderpaul been caught at deep mid-on, as he really should have been, by Craig Meschede off the bowling of Piyush Chawla when on 64 and the winning line was still 21 runs away, the ending to this always absorbing match might have been entirely different. But the two-handed opportunity went to ground and Chanderpaul captain was not about to give another chance.
Typically modest after receiving the congratulations of friend and foe alike, Chanderpaul was quick to point out that victory had been a team effort. "We showed fight all the way through," he said. "We've got two tough games to go, against Durham and Warwickshire, but hopefully we can carry on like this."
Opener Ben Slater, with 59, and budding allrounder Alex Hughes, who contributed 33 precious runs to a sixth-wicket stand of 68 with Chanderpaul, were the two young batsmen referred to by Krikken.
But, as everyone knew when play resumed this morning with Derbyshire on 127 for 4 and 117 runs still needed, almost everything depended on Chanderpaul. He's has had a far from vintage season, by his own high standards, and not won a match for the county while averaging below 40.
Here, though, he was calmness personified, pushing singles into tiny gaps, dealing with the spinning ball like the master craftsman he is and punishing bad balls with ruthless efficiency.
Piyush Chawla, who finished with 5 for 97 and 10 for 208 in the match, might have been the star turn - and probably would have taken the headlines had that catch been held. But really he released pressure far too often with freebie deliveries and was out-bowled by the highly promising left-arm spinner Jack Leach - whatever the scorecard suggests.
Somerset tried most things to disturb Chanderpaul's concentration - even giving wicketkeeper Craig Kieswetter a brief go with his offspin, but the Rock would not crumble.
Four wickets fell at the other end, the last of them with 28 still required. And when Chanderpaul started turning down singles to protect Tim Groenewald, the tension level increased by another notch. But no-one would have guessed Derbyshire's main man was in a dog-fight, although the hug he gave his partner when four leg-byes completed the task showed just how much this win meant to him.
The mood in the other camp was entirely different, of course. "We're gutted - mega disappointment, really. It's very tough to take" Somerset captain Marcus Trescothick said. "We gave it a good crack but it is clear where we lost the game."
So where did it all go wrong for the hosts in this match? Where do you want to start?
Given the tightness of the contest, they could look back on the last wicket stand of 42 in Derbyshire's first innings that lifted the lead to 195. Or, indeed, conclude that the 41 byes conceded by Kieswetter - including 22 in the second innings while enduring a nightmare session behind the stumps when Chawla was turning the ball several feet - were crucial.
But really, Somerset left themselves with a mountain to climb by subsiding to 68 for 7 by lunch on the first morning and then being bowled out for 103.
"You can't win games in the first couple of hours but you can go a long way towards losing them," Trescothick admitted. "We got close to pulling it back, and our second innings performance was brilliant, but I think we all appreciate we can't afford a first innings like that."
Surrey at home next week will give Somerset a good chance to bounce back. But of those at the bottom, Derbyshire have most to feel optimistic about right now.
"We are playing some good cricket and there is a lot of belief in the side," Krikken said. "We'll keep fighting and see where we end up."