Samit Patel helped spin Nottinghamshire to success on the final day of their LV= County Championship match against Warwickshire at Trent Bridge.
Patel returned figures of four for 23 as the visitors were bowled out for 217 in their second innings, giving the home side victory by an innings and 123 runs.
In gloomy conditions, with the floodlights burning brightly, Patel and Steven Mullaney took the last six wickets to fall, clinching a win which lifts Notts up to third in the First Division table.
Warwickshire had begun the final day on 42 without loss in their second innings, having been made to follow-on. William Porterfield frustrated the home attack for more than four hours, in making 61, as the day developed into one of dogged resistance.
Skippering the Bears in the absence of the injured Varun Chopra, Porterfield had inserted Notts at the start of the game and then seen the home side rattle along in posting a first innings score of 600.
Clearly determined to lead his side to safety, Porterfield produced his highest first class score of the season, having faced 166 balls with eight fours.
Porterfield lost his opening partner, Ian Westwood, for 19 during the early exchanges as Jake Ball found the outside edge and wicketkeeper Chris Read did the rest.
The same combination then accounted for Laurie Evans, who made 12, although the catch was taken down the leg side after a hefty deflection.
Jonathan Trott fell lbw for the second time in the match, for 22, with Brett Hutton then striking for the second time as Sam Hain chipped into the waiting hands of Luke Wood at short midwicket.
Notts were then held up for more than an hour before Read turned to spin. Samit Patel immediately trapped Tim Ambrose lbw, for 12, before then having a stroke of fortune to dismiss the opener.
Porterfield, who had battled for more than four hours, for his highest score of the season, jabbed down on the ball and turned to see it roll agonisingly onto his stumps.
Rikki Clarke and Keith Barker resisted for more than 18 overs before Notts breathed fresh life in the contest with another decisive breakthrough.
Barker clipped Mullaney firmly off his pads but was unable to get it past Riki Wessels at short leg, who pulled off an astounding reflex catch.
With the umpires repeatedly checking their light meters Mullaney and Patel were allowed to take the second new ball, with immediate benefit.
Mullaney, who took two for 35, had Jeetan Patel caught at point by James Taylor for 28 and then Patel finished the contest emphatically, trapping Chris Wright lbw before having Boyd Rankin taken at short leg.
Notts take 24 points from the contest and leapfrog Warwickshire, who gained just four, into third spot.