Town claimed a deserved 1-0 win over the league leaders courtesy of a last gasp Sean Morrison header after an exceptional second half performance at The County Ground.
The first period had been a much more even affair, with neither side able to really take control.
The first chance of the clash fell to the visitors, as David Lucas threw the ball into Scott Cuthbert, and Terriers winger Graham Carey picked up the loose ball and crossed for Jordan Rhodes, whose low shot was well saved with his feet by Town's 'keeper.
After a brief scuffle in the centre circle following a tough challenge from Jonathan Douglas on Gary Roberts, Town began to look the more dangerous of the two sides.
They might have been in front after 23 minutes, when Terriers defender Jamie McCombe inadvertently flicked a Paul Caddis cross goalwards, but 'keeper Alex Smithies pushed it acrobatically over the crossbar to save his teammate's blushes.
As the game continued to ebb and flow, Rhodes' remained the only clear cut chance to have been created.
That was until Town began to wrestle the initiative from their visitors, with Jon-Paul McGovern whipping in a dangerous cross which Sean Morrison met well, and after his header was blocked the ball dropped to Kevin Amankwaah just six yards out, but the full-back was off balance, and fired over when he might have done better.
Wilson will have been disappointed to have heard the half time whistle as it was his side who had finished on the front foot, surging forward at every opportunity but failing to beat the highly-rated Smithies.
Town flew out of the blocks in the second period and could have been in front within seconds of the restart, as Thomas Dossevi picked up the loose ball on the edge of the box and shot just wide of the post with Smithies beaten.
The dominant hosts again went close as Pericard showed great feet to beat two challenges and get a shot away inside the area, but the Terriers had bodies in the way and the ball was cleared.
Three more chances then fell to Town players in the space of 30 seconds as yet more good hold up play from Pericard resulted in chances for McGovern, Dossevi and Pericard himself, all of which were blocked by the increasingly desperate visiting rearguard.
Despite a brief resurgence from the visitors around the hour mark, Town continued to dominate, with Pericard being at the centre of every attack and Prutton and Douglas looking particularly impressive in midfield.
Just as it looked like they were going to have to settle for a share of the spoils, Town took the lead in the 90th minute when Sean Morrison rose to power an Alan Sheehan corner into the bottom corner via the fingertips of the impressive Smithies to send the home fans into raptures.
The visitors desperately sought an equaliser, but it was not forthcoming, and the final whistle was blown to give Town a thoroughly deserved three points.