JUBILANT Adnan Ahmed powered Town to a fightback victory with a stunning first career goal and promptly earned himself a new Galpharm contract.
The 21-year-old pounced with a cracking volley seven minutes from time to rescue slipshod Town from a scary situation against the division's basement strugglers.
Stockport - inspired by Warren Feeney's hat trick and some woeful defending - looked like sneaking it until David Mirfin and Ahmed scored within the space of 60 seconds to turn the scoreline around.
Joe Dolan's stoppage-time own goal gave Town their first five-goal haul since Wrexham were thumped 5-1 in October 2001 and capped only a second ever eight-goal match at the stadium, following the 7-1 crushing of Crystal Palace in August 1999.
It also ensured three priceless points after Andy Booth had scored an early leveller and Pawel Abbott had marked his return with an excellent lob to put Town 2-1 ahead.
It was Ahmed's crunching right-foot effort from 20 yards which will be the abiding memory of a topsy-turvy match, however, and fitting that it came when he was on opposite sides to Harpal Singh, who has done so much to champion the lot of Asian-descent footballers in recent years.
Ahmed left the field to a big hug from manager Peter Jackson, who confirmed talks on a new contract for the all-action midfielder will begin as soon as Town have secured League I safety.
Jackson will feel a much older man by then if Town continue to play like this.
A mixture of the sublime and the ridiculous, they mostly played well as individuals but not as units up front, in midfield and most certainly not at the back.
Long balls found Town wanting despite some vital work under pressure from skipper Nathan Clarke and big Mirfin, who deserved his second goal in as many games and also made amends for a mistake on Stockport's first goal (when he should have cleared) by sliding Abbott through for his strike with a tremendous long-range pass.
Abbott looked back to something like his best in a hard-working if not always fruitful return to the starting line-up and, while Delroy Facey had an off day just 24 hours after rejecting a permanent move to Oldham, Andy Booth led the line solidly after grabbing his seventh goal of the season with a trademark header in only the fourth minute when appearing to climb on the back of Dolan.
That wiped out Feeney's excellent second-minute lob in a frenetic opening to the game and Town dominated until the break, with Abbott, Michael Collins and Clarke all going close.
When Abbott finally found the net six minutes into the second half, it promised a landslide from Town but it was Stockport who hit back with a Feeney penalty five minutes later, when Clarke was lucky not to see red for the foul, and then a close-range header from the Northern Ireland striker on 64, after Paul Rachubka made a poor clearing punch.
Abbott, who went off to a standing ovation, was unlucky not to earn a penalty himself when bundled over in the box, but Town rallied superbly and those quickfire goals from Mirfin and Ahmed turned the game.
Much etter will be needed even to take a point at Hartlepool on Friday.