Glamorgan 346 (Hemphrey 75, Root 68, Rampaul 5-94) and 248 for 8 (Cullen 51*, Rampaul 3-55) beat Derbyshire 378 (Reece 111, Hughes 82, Dal 64, Carey 4-61) and 213 (Douthwaite 4-48) by two wickets

Tom Cullen held his nerve to score an unbeaten half-century that steered Glamorgan to a thrilling two-wicket victory over Derbyshire in the Division Two match at Derby. The 27-year-old wicketkeeper, who was only playing because Chris Cooke is injured, scored 51 from 88 balls to take Glamorgan to their target of 246 with help from Andrew Salter and Lukas Carey.

Derbyshire were favourites when they reduced Glamorgan to 162 for 7 with Ravi Rampaul taking three wickets but Cullen played superbly to give his side their first Championship win of the season.

Derbyshire began the day 203 on but for the second time in the match, the last wicket added precious runs with Rampaul taking the lead role. He smashed Michael Hogan for four before driving him over long-on for six and by the time he missed a sweep at Marnus Labuschagne, the stand with Anuj Dal was worth 51 and Derbyshire's lead was 245.

It meant Glamorgan had to make their highest successful run chase against Derbyshire to win and they started wretchedly with Nick Selman wafting at the third ball from Tony Palladino to be caught behind.

Charlie Hemphrey had scored three consecutive half-centuries but never got going and was lbw to one that kept low from Rampaul in the sixth over. Labuschagne looked in good touch but after several fluent drives through the covers, he tried to turn Rampaul to leg and was caught at midwicket for 32.

At lunch, Glamorgan needed another 170 but they could not build a partnership as Billy Root was trapped by one from Rampaul that nipped back and was on his way before the umpire's finger was raised.

Glamorgan's task was complicated by increasing variable bounce from the Racecourse End and when David Lloyd fell in the thirties for the fourth time in five innings, lbw half-forward to Palladino, Derbyshire were favourites. Jeremy Lawlor lifted Matt Critchley over wide long-on for six but then dragged the legspinner to deep midwicket and after Daniel Douthwaite drove a slower ball back to Wayne Madsen, Glamorgan appeared to be fading on 163 for 7 at tea.

But Cullen had played well in the first innings and with Salter, reduced the target to 30 going into the last hour and the stand was worth 55 in 25 overs when Salter cut at a wide ball from Luis Reece and Madsen held a sharp catch at slip. Derbyshire tried to unsettle the batsmen with short balls but Cullen took 10 from a Logan van Beek over before driving a Critchley full toss for the winning boundary.