A battling performance by Chesterfield counted for nothing as Tranmere snatched victory by 3-2 in a thrilling FA cup tie at Prenton Park.
The Merseysiders were ahead after only three minutes when Eugene Dadi found the target with an angled shot when set up by Iain Hume.
Tranmere dominated the first period, but Chesterfield keeper Carl Muggleton made several excellent saves to keep them at bay.
The keeper did well to hold on to a penalty by Hume but possibly justice was served. It seemed a very harsh decision when Gareth Davies was adjudged to have barged Gareth Roberts over near the corner of the box.
Chesterfield drew level on 51 minutes when Davies drilled home with a shot as sub Steve Blatherwick headed on a throw-in by Mark Allott.
Hume put Tranmere back in front with a neat finish on 80 minutes when put clear by Micky Mellon, but Chesterfield were level three minutes later when Ian Evatt headed in again following a throw-in by Allott which was flicked on by Blatherwick.
Then Evatt became villain as he brought down Hume for a second home penalty on 86 minutes. This time Mellon took the kick and netted into the left-hand corner.
"We worked our socks of and played some magnificent football. We put up a great fight and are disappointed to be out of the cup," said Chesterfield boss Roy McFarland.
"It turned out to be a very good cup tie. Both sides went for it," said Tranmere manager Brian Little.
"We should have been more than one goal up on half time and Chesterfield made it hard for us. I was surprised at the first penalty but there was no doubt about the second."