Craig Westcarr struck a late winner as Chesterfield beat Tranmere 4-3 at the B2net Stadium to reach the JPT northern section semis.
Adam McGurk put Rovers ahead, but Alex Mendy and Jordan Bowery gave the Spireites the lead before Enoch Showunmi and Mustafa Tiryaki restored the visitors' advantage. There was still time for further drama, though, as Bowery levelled with 10 minutes remaining prior to Westcarr striking the decisive blow.
Tranmere had already beaten Chesterfield in League One this season and went in front in the ninth minute when McGurk chested the ball down and fired a 25-yard shot into the bottom corner.
The hosts had Drew Talbot stretchered off after 20 minutes with what was later confirmed as "mild concussion", but equalised just before half-time when Mendy burst forward and fired home.
Mendy was involved in the second goal, his pass setting up Westcarr, who crossed for the unmarked Bowery to head in from eight yards. But two goals in four minutes put the visitors back in front, with Showunmi punishing poor marking to head home in the 69th minute before Ole Soderberg fumbled a Tiryaki shot into the net in the 72nd minute.
However, the Spireites showed incredible resistance and, after Bowery headed an equaliser, Westcarr profited on some poor defending to head Danny Whitaker's free-kick home and settle the thriller.