Yorkshire 195 for 8 (Moeen 51, Morley 4-44) beat Derbyshire 194 for 4 (Andersson 81, Revis 1 for 29)
Big hitting in the final five overs took Yorkshire to a dramatic two-wicket victory over Derbyshire in the Vitality Blast at Headingley.
All had seemed lost when the home side were 139 for 8, still needing 56 with 27 balls left but Hasan Ali, with 31 not out off 13 balls, and Andrew Tye (32 off 13) sealed the win with four balls to spare.
A second defeat of the season was hard on Derbyshire, for whom Martin Andersson made a career-best 81 not out in their 194 for 4 and Jack Morley took 4 for 44 and two catches, but Moeen Ali's 51 kept his side in the game before Tye and Hasan sealed the win with a fusillade of sixes.
Having opted to bat, Derbyshire scored 57 runs in their powerplay for the loss of Aneurin Donald, who was caught at mid-on by Tye off Hasan for 10.
The visitors' progress was halted, first in the seventh over, when Caleb Jewell holed out to Matthew Revis at deep backward square leg off Tye for 20, and then five balls later, when Wayne Madsen was caught by Hasan off Revis for 2.
That left the visitors on 63 for 3 but Derbyshire continued to score at a brisk rate without dismantling Yorkshire's attack. The hundred came up in the 12th over and Andersson reached a 36-ball fifty in the 14th.
With five overs to go, the score was 131 for 3 but the 73-run stand was broken four balls later when Matthew Montgomery was bowled by Jafer Chohan for 35. Nevertheless, he and Andersson had set a new record for Derbyshire's fourth wicket in T20 cricket against Yorkshire.
Ross Whiteley's arrival brought an increase in the scoring rate but Derbyshire's total was still only 170 for 4 after 19 overs before Whiteley hit Tye for two sixes in a last over that yielded 24 runs and left the visitors with a total that seemed little healthier than par. Four Yorkshire bowlers finished with one wicket apiece, the most economical being Chohan, who took for 1 for 32.
Yorkshire's pursuit of 195 for victory began in explosive fashion. Adam Lyth hit three sixes and two fours in an 11-ball 31 before being caught at midwicket by Montgomery off Akif Javed in the third over and two balls later, Jonny Bairstow was leg before to Morley for 8. Things got worse for the home side two balls before the end of the powerplay when James Wharton holed out to Morley off Nick Potts for 5, a dismissal that meant Yorkshire were 52 for 3 after six overs.
Moeen hit Morley for two sixes in an over but those blows sandwiched the dismissal of Will Luxton, who was bowled by the slow left-armer for 5. Yorkshire reached the halfway stage of their innings still needing 110 to win but Morley soon struck further blows, having Revis caught at backward point by Jewell for 13 and then taking a fine catch on the boundary at point off Montgomery to remove George Hill for a duck.
Moeen then hit Potts for over the rope to reach his fifty off 33 balls with five sixes but he was caught on the deep point boundary by Amrit Basra attempting a third.
Yorkshire were 133 for 7, needing 62 off the last five overs but Morley then took his fourth wicket when he removed Dom Bess. Big hitting by Tye left the home side needing 32 off three overs, a task they accomplished in spectacular fashion.
