Chesterfield opened their new b2net Stadium with an entertaining 5-4 friendly defeat to Derby.
New signing Craig Davies opened the scoring for the hosts, but Kris Commons soon equalised for Nigel Clough's men.
Simon Ford restored Chesterfield's lead before Mark Allott gave them a two-goal cushion in the 34th minute.
Trialist Connor Doyle pulled a goal back for Derby a minute later and Chris Porter levelled for the Rams after the break.
John Brayford put the Championship side ahead for the first time and then Commons grabbed a second from the penalty spot.
Derek Niven gave Chesterfield hope late on, but the Rams held on for a thrilling win.