Birmingham Bears qualified for the quarter-finals of the NatWest T20 Blast at Yorkshire Vikings' expense on an exciting final night of action in the North Group.
Yorkshire knew victory over Nottinghamshire Outlaws at Headingley would be enough for them to advance and they looked well placed at the halfway stage as Aaron Finch (89) and Jonny Bairstow (60) led them to 200-5.
Alex Hales launched Nottinghamshire's run chase with a 40-ball 67 but the Outlaws still needed 39 off the final three overs.
That was no problem for Notts skipper James Taylor (35no) and James Franklin (19no), who led their side home with four balls to spare, a win that secured them second place in the North Group.
Ryan Sidebottom's penultimate over disappeared for 22 runs before Franklin launched a six - his third in six balls faced - off Tim Bresnan to finish the game.
Yorkshire's defeat opened the door for Birmingham Bears to snatch fourth place in the final table and they did just that with a 52-run victory against Leicestershire Foxes at Edgbaston.
Varun Chopra's 72 set up a total of 160-6 for Birmingham and Leicestershire were all out for 108 in reply, Recordo Gordon picking up 3-18.
Birmingham's reward is a trip to South Group winners Essex in the last eight, while Nottinghamshire will host Hampshire at Trent Bridge.
Worcestershire Rapids finished third in the North Group, ending the group campaign by beating Derbyshire Falcons for their eighth win.
Ross Whiteley slammed nine sixes in his 84 not out off 38 balls against his former county as Worcestershire piled up 209-4 before Derbyshire - who have won just one match in the competition this season - ended short on 181-7 in their run chase.
Worcestershire will travel to The Oval to face Surrey in the quarter-finals.
John Hastings produced a stunning innings to ensure Durham Jets signed off with a five-wicket victory over Northants Steelbacks in the dead rubber at Chester-le-Street.
The Australian's 80 not out from 26 deliveries saw Durham to a target of 196 with five balls to spare.
Durham finish sixth, one place above defending champions Northants in the final North Group table.