Huddersfield Town withstood Brentford pressure to seal a first win in five Championship games.
Sean Scannell's first-half strike and Jake Bidwell's 49th-minute own goal put the home side two to the good.
But ex-Leeds United midfielder Jonathan Douglas pulled one back after 70 minutes to make it a tense finish for home fans.
Joel Lynch's groin injury picked up at Bolton the week before meant a start for centre-back Murray Wallace, while Jonathan Hogg replaced on-loan West Ham midfielder Diego Poyet.
Brentford boss Mark Warburton named an unchanged side, with the Londoners chasing a sixth straight win, a feat never previously achieved by them at Championship level.
Warburton's side started brightly, with wideman Alan Judge to the fore.
He shot narrowly wide, then had a fizzing effort tipped over by Alex Smithies, while Nahki Wells came close in the counter-attack for Town.
The home side went ahead in the 18th minute through a sweeping move involving Jacob Butterfield, Jack Robinson and Wells, who teed up Scannell for a decisive finish.
Brentford defender Bidwell had a shot saved by Smithies while Butterfield twice tested visiting stopper David Button.
Alex Pritchard then came close for Brentford before Wells had a shot deflected for a corner as play went from end to end.
Town made a fine start to the second half, and Bidwell diverted left-back Jake Robinson's cross into his own net under pressure from Scannell.
But Brentford continued to look dangerous, and Douglas had a shot saved by Smithies before beating him with a low drive.
Town, who brought James Vaughan off the bench for a first appearance since mid-September following a calf injury, survived a couple of late scares for a very welcome three points.