Lancashire all-rounder Tom Smith made a superb 35 not out to guide his side to a nerve-shredding one-wicket victory over Durham in the LV= County Championship Division One relegation battle at Emirates Old Trafford.
Smith added 17 for the last wicket with Simon Kerrigan and the win, which was completed with only two balls to spare, lifts Lancashire out of the bottom two at their opponents’ expense.
Yet the outcome was very hard on Durham's seamers, who staged a magnificent attempt to defend 107 after the visitors were earlier dismissed for 187 in their second innings.
John Hastings and Chris Rushworth performed superbly to reduce Lancashire to 36 for five inside 14 overs before Smith and Alex Davies, who made 23, added 43 for the sixth wicket to calm the home supporters.
However, Ben Stokes then took three wickets in eight balls and when Tom Bailey was caught at mid-off by Mark Stoneman off Hastings, Durham were firm favourites with Lancashire on 90 for nine.
Kerrigan had other ideas, though, and he made 10 not out alongside Smith as the pair guided Lancashire home with an apparent calmness they probably did not feel.
Here's the winning moment for @Tcp24 @ @Kegs10@LancsCCCpic.twitter.com/N5JG9m2ApX
— Lancashire CCC (@LancsCCC) August 18, 2014
Hastings finished with 4-40, Stokes took 3-25 in 8.4 overs and Rushworth's new-ball spell earned him figures of 2-21. Only Smith, Davies and Kerrigan reached double figures in Lancashire's second innings.
Earlier in the day, the six-man home attack took nine wickets for 128 to set up the thrilling climax.
Durham scored 70 runs in 33 overs to take a lead of 48 in the morning session but they lost five big wickets in doing so.
Three of these fell to Kerrigan, who had both Keaton Jennings and Michael Richardson lbw before claiming the vital scalp of Ben Stokes when the England all-rounder clipped the ball firmly to leg, only to see short-leg Steven Croft take an outstanding catch.
Glen Chapple had Scott Borthwick lbw on the front foot for 20, although the Durham player was well forward and appeared a little unlucky to fall foul of the decision.
Five minutes before the interval Steven Parry took his first top division wicket since 2009 when Phil Mustard tried to work the slow left-armer to leg but lost his leg bail, a remarkable dismissal given that Parry was operating over the wicket at the time.
Paul Collingwood came into lunch on 14 and Calum MacLeod was unbeaten on one.
Wicket Watch: Mustard bowled by Parry http://t.co/gb6Tf5Gz1H
— Lancashire CCC (@LancsCCC) August 18, 2014
In the afternoon session Lancashire took wickets steadily with three bowlers enjoying success. Five overs after the resumption MacLeod was run out without addition when he pushed Kerrigan for a single but was beaten by Bailey's direct hit from cover.
The strength and depth of Durham's batting was proved to a degree by Hastings, who followed his first innings 83 by batting half an hour for 16 and helping Collingwood add 22 valuable runs.
However, Durham's number nine was beaten by a full-length, swinging delivery from Chapple which he could only edge to Davies. Ryan Buckley, who had been off the field with a virus for the previous two days, then made nine but his resistance was ended when he nicked Croft to Paul Horton at slip.
Despite Collingwood's attempts to farm the strike, Rushworth eventually had to face a delivery and Bailey cleaned him up second ball.
That left Lancashire needing what appeared to be a modest 107 to win. Kerrigan finished with 4-61 and match figures of eight for 147 after his most impressive display with the ball this summer.
For his part, Collingwood did all he could to resist the Lancashire bowlers and was 45 not out after batting defiantly for 142 minutes. Ultimately, though, his thoughtful captaincy could not prevent Lancashire recording a vital victory.