Huddersfield boosted their Championship survival hopes with a victory at Bristol City courtesy of a James Vaughan hat-trick.
Vaughan drove in a shot from Lee Novak's cross and headed in an Oliver Norwood free-kick to quickly give the visitors the upper hand.
Vaughan nodded home his third from close range from another Novak cross.
Huddersfield have won three of their last four league games in their battle for Championship survival.
Bristol City, who are already relegated, managed a sole consolation goal when Lewin Nyatanga headed in.
The result moved Huddersfield three points from third-from-bottom Barnsley, with the two teams meeting in the final game of the season next week.
The win over the Robins gave the Terriers consecutive wins for the first time since October 2012.
Huddersfield got off to a flying start, taking only two minutes to go in front, with on-loan Norwich forward Vaughan's early double taking his goal tally for the season to 13.
Striker Novak played a huge part in Vaughan's success and the former might have scored himself only to miss from six yards.
City started to threaten but their attempts to get back into the game were undermined when Vaughan completed his hat-trick with another header.
The season can barely end quickly enough for City, who last tasted victory on 9 March.
Huddersfield boss Mark Robins:
"James showed how much he cares about our club with the way he celebrated his goals. That isn't always the case with loan signings.
"He has been good for us and I think we have been good for him. What the future holds I can't say, but he was terrific.
"It's amazing to be on 57 points in the Championship and not be mathematically safe."
Bristol City head coach Sean O'Driscoll:
"That performance was the worst since I came here and totally unacceptable. We played without pride and I can assure supporters that won't happen again.
"We owe them an apology. In our last game at Hull we looked as though we shouldn't be relegated, but today we showed why we are going down.
"Losses are inevitable at times and it is how you lose that counts. We have a lot of work to do during the summer and need to man-up."
Sorry, we were unable to load match stats, please try again.
Live Text Commentary
Full Time The referee signals the end of the game.90:00 +2:06
Oscar Gobern fouled by Greg Cunningham, the ref awards a free kick. Direct free kick taken by Adam Clayton.90:00 +0:26
Shot by Jon Stead from deep inside the penalty area misses to the right of the goal.89:01
Assist by Greg Cunningham.89:01 Goal scored
Goal! - Lewin Nyatanga - Bristol C 1 - 3 Huddersfld Lewin Nyatanga finds the back of the net with a headed goal from inside the six-yard box. Bristol City 1-3 Huddersfield.88:02
Free kick crossed right-footed by Neil Kilkenny from left channel, clearance made by Alan Lee.88:02 Substitution
Substitution Alan Lee replaces James Vaughan.88:02
Keith Southern gives away a free kick for an unfair challenge on Brian Howard.85:09
Tom Heaton restarts play with the free kick.85:09 Substitution
Substitution Paul Dixon replaces Sean Scannell.85:09
Unfair challenge on Lewin Nyatanga by James Vaughan results in a free kick.83:15
Sean Scannell gives away a free kick for an unfair challenge on Greg Cunningham. Greg Cunningham takes the direct free kick.82:41
Corner from the right by-line taken by Brian Howard, clearance by Peter Clarke.79:47 Substitution
Substitution Louis Carey comes on in place of Matthew Bates.79:47 Substitution
Substitution Brian Howard is brought on as a substitute for Steven Davies.78:47
Albert Adomah has a headed effort at goal from close in which goes wide left of the goal.75:38
Sam Baldock takes a shot. Oscar Gobern gets a block in.74:32
Jon Stead fouled by Peter Clarke, the ref awards a free kick. Albert Adomah takes the direct free kick.73:20
Corner taken right-footed by Adam Clayton from the right by-line, Unfair challenge on Lewin Nyatanga by Anthony Gerrard results in a free kick. Direct free kick taken by Tom Heaton.73:04
James Vaughan takes a shot. Tom Heaton makes a save.
Sam Baldock produces a right-footed shot from close range and strikes the post.70:35
Keith Southern challenges Steven Davies unfairly and gives away a free kick. Steven Davies takes the free kick.70:11
Jon Stead is flagged offside by the assistant referee. Peter Clarke restarts play with the free kick.68:55
Free kick awarded for a foul by Peter Clarke on Liam Kelly. Strike comes in from Steven Davies from the free kick.66:12
Greg Cunningham fouled by Lee Novak, the ref awards a free kick. Free kick taken by Lewin Nyatanga.64:57 Substitution
Substitution Oliver Norwood leaves the field to be replaced by Keith Southern.63:48
Assist by Lee Novak.63:48 Goal scored
Goal! - James Vaughan - Bristol C 0 - 3 Huddersfld James Vaughan finds the back of the net with a headed goal from close in. Bristol City 0-3 Huddersfield.63:14
Free kick awarded for a foul by Greg Cunningham on Jack Hunt. Direct free kick taken by Alex Smithies.62:30
The offside flag is raised against James Vaughan. Tom Heaton takes the free kick.55:21
Peter Clarke gives away a free kick for an unfair challenge on Jon Stead. Neil Kilkenny takes the direct free kick.54:28
Tom Heaton restarts play with the free kick.54:28 Substitution
Substitution Jon Stead replaces Marvin Elliott.54:28
Lewin Nyatanga fouled by James Vaughan, the ref awards a free kick.45:01
The referee blows his whistle to start the second half.45:00 +1:23 Half time
Half Time The referee blows for half time.45:00 +0:52
Inswinging corner taken by Oliver Norwood from the left by-line, Lewin Nyatanga makes a clearance.42:31
Foul by Albert Adomah on Oliver Norwood, free kick awarded. Alex Smithies takes the direct free kick.41:53
Corner taken by Neil Kilkenny from the left by-line to the near post, clearance by James Vaughan.39:49
Free kick awarded for a foul by Steven Davies on Adam Clayton. Alex Smithies restarts play with the free kick.38:08
Lee Novak is ruled offside. Indirect free kick taken by Tom Heaton.36:40
Foul by Oscar Gobern on Liam Kelly, free kick awarded. Direct free kick taken by Neil Kilkenny.32:06
Right-footed shot by Liam Kelly missed to the left of the goal.29:16
Unfair challenge on James Vaughan by Neil Kilkenny results in a free kick. Peter Clarke takes the direct free kick.24:26
Lee Novak has an effort at goal from close in which goes wide right of the target.21:46
Header by Matthew Bates from deep inside the penalty area misses to the left of the target.21:26
Foul by Calum Woods on Albert Adomah, free kick awarded. Steven Davies restarts play with the free kick.19:27
Oliver Norwood takes the floated corner, James Vaughan challenges Marvin Elliott unfairly and gives away a free kick. Tom Heaton restarts play with the free kick.19:06
James Vaughan takes a shot. Save by Tom Heaton.16:25
Foul by Lee Novak on Neil Kilkenny, free kick awarded. Neil Kilkenny takes the direct free kick.12:38
Assist by Oliver Norwood.12:38 Goal scored
Goal! - James Vaughan - Bristol C 0 - 2 Huddersfld James Vaughan finds the back of the net with a headed goal from inside the penalty box. Bristol City 0-2 Huddersfield.12:02
Liam Kelly challenges Lee Novak unfairly and gives away a free kick. The ball is delivered by Oliver Norwood,11:20
Free kick awarded for a foul by Albert Adomah on Sean Scannell. Free kick taken by Calum Woods.10:27
Free kick awarded for a foul by Steven Davies on Oliver Norwood. Oliver Norwood takes the direct free kick.7:25
The referee blows for offside against Lee Novak. Tom Heaton takes the free kick.6:10
Unfair challenge on Steven Davies by Calum Woods results in a free kick. Richard Foster restarts play with the free kick.3:29
Effort on goal by Lee Novak from deep inside the penalty area misses to the right of the target.1:42
The assist for the goal came from Lee Novak.1:42 Goal scored
Goal! - James Vaughan - Bristol C 0 - 1 Huddersfld James Vaughan finds the back of the net with a goal from deep inside the penalty box to the bottom right corner of the goal. Bristol City 0-1 Huddersfield.0:20
Free kick awarded for an unfair challenge on James Vaughan by Matthew Bates. Oliver Norwood produces a shot on goal direct from the free kick.0:00
The ref blows the whistle to start the match.
Live data and text provided by our data suppliers