Huddersfield striker Phil Jevons returned from a lengthy injury lay-off just in time to condemn Luton to a sixth straight defeat and extend his own team's unbeaten run under caretaker manager Gerry Murphy to six.
Jevons rose above the downtrodden Luton defence to power in a brilliant headed goal after Joe Skarz's cross caused mayhem after 77 minutes.
Before that rare moment of quality, relegated Luton and mid-table Huddersfield appeared to be cantering through this end-of-season dead rubber, scarcely breaking into sweat on a balmy afternoon at Kenilworth Road .
A draw had looked the likeliest outcome, although the Terriers showed more composure on the ball as they ended the season on a relative high after the recent sacking of previous boss Andy Ritchie.
Incoming manager Stan Ternent was watching from the stands, but it was Hatters midfielder Lewis Emanuel who had the first meaningful attempt on target after 12 minutes with a powerful left-foot shot from fully 25 yards that was too close to Terriers keeper Matt Glennon.
But the best chance of the half fell to the visitors.
Huddersfield caught Luton's backline napping when Andy Holdsworth surged forward and exchanged passes with Danny Schofield.
But somehow with the goal at his mercy, unmarked Schofield blazed over from 10 yards out.
The Hatters finally started playing and Sam Parkin should have hit the target with header from an Emanuel cross.
The former Swindon hitman was then unlucky to see a 20-yard curler drift just wide of Glennon's post just before half-time.
Desperate to give the home fans some respite after a shocking season, Luton at least began the second half with more purpose, but Huddersfield had few problems containing the threat.
Five minutes after the break, Edward Asafu-Adjaye, who was recently promoted from the youth team, shot just wide.
Then Don Hutchison - playing his last game for the Hatters before being released - forced Glennon to superbly turn away his low drive on the hour.
Huddersfield almost hit back immediately when Schofield's point-blank shot was bravely saved by sought-after keeper Dean Brill.
A flurry of substitutions then sent the game back to sleep before sub Jevons' late intervention.