Tranmere fell to their first home defeat under boss Brian Little and could have few complaints following the 3-2 defeat against Chesterfield.
Chesterfield dominated the first half and were unlucky to find themselves behind by the 73rd minute after leading at the interval.
But two goals in the last ten minutes saw them to only their third away victory in the league this season.
Tranmere, with one eye on Tuesday's FA Cup Quarter-final replay against Millwall, were well out of sorts but the result brought joy to Chesterfield who had lost 3-2 at the same ground in the first round of the FA Cup way back in November.
Glynn Hurst was a constant threat up front for the Spireites and netted in the 21st minute from an Ian Evatt pass following a free-kick by Allan O'Hare.
Tranmere rarely threatened and changed their formation at the start of the second period when sending on subs David Beresford and Shane Nicholson.
It needed a super save by Carl Muggleton to deny Gary Jones in the 51st minute but the Merseysiders did get level in the 62nd minute. A woeful back-pass by Gus Uhlenbeek was intercepted by Jones who set up Iain Hume for an easy goal.
Hume then put Rovers ahead from a Gareth Roberts cross in the 73rd minute and it seemed there would be no way back for Chesterfield.
But in the 83rd minuteUhlenbeek pumped the ball forward and Jones, under a challenge from Evatt, put the ball into his own net.
Then in the 86th minute Hurst headed the winner at the far post from a deep cross by Chris Brandon.
Boss Roy McFarland said: "It was a deserved result, we dominated the game and it was an injustice when we found ourselves trailing 2-1. But we kept our self belief and it brought a just reward." Tranmere boss Brian Little said: "To be honest I am very disappointed. I thought we had clawed our way back but we made two bad mistakes. Overall Chesterfield deserved to win. The last ten minutes for us were painful."