Delano Burgzorg's winner helped Huddersfield beat Sunderland 2-1 to end a five-game winless run and move six points above the Championship relegation zone.
The visitors took the lead through Michal Helik's header from a well-worked corner, but the Black Cats quickly levelled as Luke O'Nien fired home from a free-kick.
Visiting goalkeeper Chris Maxwell made some fine saves to keep the score level throughout the second half before Burgzorg bagged the winner in the 67th minute.
The result meant the Terriers moved clear of the bottom three, while Sunderland dropped into 11th.
- Championship fixtures | table | highlights
- Stream the Championship and more with NOW
- Get Sky Sports | Download the Sky Sports App
Huddersfield had an early chance after a quick move down the right saw the ball crossed into Jaheim Headley, but Anthony Patterson made a great save one-on-one.
A slow start to the match saw Sunderland retain most of the ball, but the visitors threatened on the counter-attack and took opportunities when they could.
A neat pass split the home defence down the middle for Burgzorg to burst forward, but he fired into the side-netting.
Huddersfield took the lead in the 28th minute when the Black Cats were unable to clear their lines from a corner as Tom Lees headed the ball towards Helik, who nodded in at the near post.
Sunderland had an opportunity almost instantly from a free-kick just outside the box when Jack Clarke's vicious effort forced Maxwell into an excellent dive to his left to push the ball away.
They soon found the equaliser in the 40th minute after Patrick Roberts' free-kick reached Jenson Seelt in the box, who nodded to O'Nien at the near post for the captain to smash home from close range.
A quick start to the second half saw Sunderland nearly take the lead when Seelt blasted over the bar from Roberts' cross.
Maxwell continued to keep his side in it, sticking a leg out to deny Jobe Bellingham one-on-one before making a superb save to paw away Trai Hume's effort that looked destined for the top corner.
Despite Sunderland's good chances, Huddersfield retook the lead in the 67th minute after the hosts failed to stop Headley's mazy run which led to Burgzorg getting the ball on the edge of the box and slotting it into the bottom corner.
Maxwell was forced into a save from Alex Pritchard's free-kick and the hosts struggled to break through the Huddersfield defence.
Sunderland continued to push in stoppage time as Maxwell made a great save from point-blank range from Clarke's powerful shot and the rebound from Neil was cleared as the Terriers held on for three points.
The managers
Sunderland's Tony Mowbray:
"We're disappointed with the result, disappointed with the performance, lacked a bit of energy tonight, lacked a bit of creativity breaking down their defence. It's not the first time we've faced a team who put a lot of men behind the ball and it's not the first time we've struggled to break them down and score goals, so we just have to keep working.
"It's a frustrating night for us, disappointed with the goals we lost of course, a set-play and a ridiculous goal the second goal. No excuses, congratulate them and say well done, they came and made life difficult for us and got the points."
Huddersfield's Darren Moore:
"I thought we had a great chance in the first five minutes and credit to the keeper, (Anthony) Patterson, he pulled off a great save. But it gave us impetus that there would be areas to exploit and I thought when those areas came, from a small critique point of view, I thought we could have done better when those opportunities came. But it's an improvement in terms of where we've been, where we're at and where we need to continue going forward with it really.
"Credit to the players, the work off the ball was good, I thought we could have used it better and stayed on the ball longer in areas and not be so anxious to release the ball at times, but again, it's a learning process for us and I'm pleased to get the three points most importantly."