An injury-time equaliser stretched Mansfield's unbeaten run to five matches and denied Huddersfield only their second away win of the season.
Late substitute Craig Disley popped up in the right place to stab in Iyseden Christie's low cross two minutes into injury time to complete Mansfield's second fightback of the match.
David Artell had crowned the first recovery, turning in the loose ball from Lee Williamson's free-kick and haul the home side level at 2-2 in the 61st minute after they had trailed by two goals.
But within two minutes the Terriers, who finally ended a run of six successive away defeats, were back in front when the Â£1million-rated Jonathan Stead headed in his second goal of the game and 14th of the season from a Danny Schofield cross.
Mansfield piled on the pressure in a rousing finale. Liam Lawrence blasted over, Junior Mendes' close-range shot was deflected wide and substitute Neil Mackenzie saw his delicate lob clawed out from under the bar.
Huddersfield looked to have survived before Disley struck with his fourth goal of the campaign.
Earlier Huddersfield had been gifted a 15th minute lead when home keeper Kevin Pilkington, under no pressure, cleared straight to the unmarked Schofield and he cleverly lobbed into an empty net.
The visitors deservedly doubled their lead on the half-hour with the home side struggling to create any openings and holding the Terriers' pacy attack.
This time Schofield was the provider, racing clear on the break before squaring to the unmarked Stead who side-stepped the keeper to score.
The Stags, restricted to just two tame long-range shots from Mendes and Lawrence, grabbed a lifeline two minutes into first-half injury time when Rhys Day headed in a Lawrence corner off the inside of the post.
Just 20 seconds into the second half Mansfield's half-time substitute Christie almost scored with his first touch, but his close-range drive was bravely blocked by Phil Senior and that set the trend for a thrilling, see-saw second half.