Huddersfield sub Nakhi Wells stepped off the bench to grab a last-minute debut winner and deny Ian Holloway a winning start in his first game as Millwall manager.
Defeat was a bitter pill to swallow for new boss Holloway and the travelling fans, who had provided such great support for The Lions throughout.
Wells, who only signed on loan from Bradford City on Friday night, showed just why Huddersfield will pay a club record for his services with a clinical finish after picking up a weak Jack Smith header.
It was rough justice on Millwall, who played with a real sense of passion and purpose throughout.
Holloway stuck with the same team beaten at Southend United, bar Jermaine Easter, who sat out the game through suspension with Scott McDonald coming in up front.
After an even opening few minutes The Lions had an 11th-minute penalty appeal turned down when Lee Martin skipped into the area and seemed to have his heel clipped as he prepared to pull the trigger. Despite protests from the visiting camp, referee Tierney waved play on.
Millwall went close again on 21 minutes when Steve Morison broke through on the right side of the penalty area, only to hit his angled drive straight into the arms of grateful Terriers keeper Alex Smithies.
Huddersfield's Jonathan Hogg could count himself lucky as his elbow on Nicky Bailey went unsighted by the officials and no punishment dispensed.
The home side were frustrated by the hard-working Lions and on the two first-half occasions they did ask serious questions of the visiting defence, keeper David Forde brilliantly blocked from Martin Paterson to keep out the former Burnley man.
At the other end McDonald went agonisingly close to breaking the deadlock with a low angled drive that clipped the right hand post. The ball was played back in and Morison's header was plucked out of the air by Smithies.
The first 45 minutes provided a solid platform for Millwall to build on, but it was the home side who went close moments after the restart when Adam Hammill's low shot flashed narrowly off-target.
Huddersfield brought both Wells and Duane Holmes on 10 minutes into the second period with Martyn Woolford replacing Lee Martin for The Lions.
Woolford so nearly made a sensational impact with a shot-on-the-turn gathered by Smithies following neat interplay between fellow sub Andy Keogh and Richard Chaplow on the right.
Keogh sent a thumping first-time shot inches wide before Liam Trotter, a 71st-minute replacement for Jimmy Abdou, fired into the side netting following another Millwall attack.
However with the game heading towards the final seconds of the final minute Adam Clayton pumped a long ball forward, Smith's headed clearance spun up into the air instead of back to his keeper and Wells reacted quickly, producing a crisp finish.
With three minutes injury time The Lions piled forward in an attempt to force a leveller that their display deserved.
Sadly it was not to be and Holloway was not able to mark his first game at the helm with the clean sheet and point his team so deserved.