Yeovil Town 1-2 Huddersfield Town
Huddersfield midfielder Adam Clayton's injury-time winner pushed bottom club Yeovil to the verge of relegation from the Championship.
The Terriers led when Nahki Wells slid in at the far post - his seventh goal since arriving from Bradford in January - after a driving run by Adam Hammill.
Town's lead lasted less than four minutes as Tom Lawrence equalised for Yeovil with a thunderous low free-kick.
But Clayton rifled in to leave Yeovil six points adrift with two games left.
The results leaves the Glovers rooted to the bottom of the table while Huddersfield have guaranteed their position in the Championship.
Yeovil now require an improbable set of results and a considerable swing in goal difference to extend their one-year stay in the second tier, the highest level they have ever played at.
The hosts came close to notching an opener inside three minutes when James Hayter headed Kevin Dawson's drilled cross over the bar.
Huddersfield, who made the 250-mile trip south without a win in their last 10 league matches, started slowly and should have conceded moments later when Hayter's header beat Alex Smithies but rattled the crossbar.
Welsh winger Lawrence looked the most likely to break the deadlock for the Glovers and he forced Smithies into a good save when his fizzing free-kick appeared to be spiralling towards the top corner.
Moments later the 20-year-old spurned a glorious opportunity as he galloped through on goal following a defensive mix-up between Anthony Gerrard and Murray Wallace. However, his decision to try to take the ball around Smithies backfired as the giant keeper got down quickly and plucked the ball from the youngster's feet.
Yeovil, who also came into the match short of form with only one win in their last 10 matches, continued to labour in front of goal and were left cursing referee Stuart Attwell shortly before the hour mark when Lawrence appeared to be tripped inside the box, but his claims were waved away.
The visitors snatched the lead following a swift 69th-minute counter attack when Hammill darted down the right flank from inside his own half before superbly guiding the ball to the back post for Wells to bundle home from close range.
But three minutes later Yeovil's survival hopes were resurrected when Lawrence's fierce free-kick dissected the Huddersfield wall and flew past Smithies.
Gary Johnson's side pushed for a late winner in eight minutes of added time, but midfielder Clayton stunned Huish Park by drilling a late decider with seconds remaining to leave Yeovil's relegation to League One all but mathematically confirmed.
Yeovil manager Gary Johnson: "We knew we were in a division that we had to enjoy and we have done that. Our supporters have enjoyed the Championship and we're definitely competing above our status.
"Hopefully being back in League One we can regroup and challenge to get back into this league.
"We need to become bigger as a club, have better infrastructure, better stadium and a bigger budget if we're going to be anywhere near keeping a team in the Championship. Our attendance today was around 5,000 - if you're in the Championship you can't survive on that.
"We owe it to the other teams in this division to keep giving our best and make sure we try to pick up points in our last two games."
Huddersfield manager Mark Robins: "That was tough to watch and this Championship can do all sorts to you. We've got competent players but they looked less than competent in the first half and kept giving the ball away.
"The Easter period is always tough with the quick turnaround in games. The same players are used and it becomes a real slog. I'm just grateful we could see it out and Adam's winner was outstanding.
"There's a big relief out there because we needed the three points desperately today. I'm still disappointed we're talking like that and this season has to be a lesson. It's not going to the very last game this season so that's progress, but I'd like a long summer of hard work to try and improve us for next season.
"My thoughts can now turn to the summer because we've secured our status."