Huddersfield made it five home wins in a row as Naby Sarr inspired a dramatic 2-1 victory over Blackburn.
Rovers thought they had salvaged a point when substitute Sam Gallagher pounced with four minutes left to cancel out Sarr's headed opener.
But the big defender had the final say as the game entered injury time as he ghosted on to Pipa's floated pass to grab a stunning winner.
The visitors had enjoyed a lively start with Adam Armstrong, Harvey Elliott and Ben Brereton linking well. Armstrong found Elliott inside the box in the first minute after Town dawdled in possession, but his effort was deflected behind.
Tom Trybull was back in the Rovers side as one of three changes but he lasted just 10 minutes before hobbling off to be replaced by Lewis Holtby.
Elliott had another sight of goal after 16 minutes when Brereton rolled the ball across the box, Armstrong let it run between his legs and Elliott fired over.
Town then began to show why they are in fine form at home, the lively Juninho Bacuna twice coming close, forcing a sharp save from Thomas Kaminski with a fierce close-range half-volley after a sweeping attack, before stinging the keeper's palms from range.
With the game opening up, Armstrong had two terrific chances to add to his 15 league goals this season. Picking the ball up wide right, the former Newcastle man took on the Town defence, the ball falling in the box to Bradley Johnson whose shot was blocked by Harry Toffolo back to Armstrong, but his goalbound snapshot was kept out by a fantastic reaction save from Ryan Schofield.
Minutes later Armstrong should have scored again, Ryan Nyambe getting to the byline and pulling back for the striker to put it wide of the near post.
Town pressed just before half-time and got an extra man in behind, Nyambe's pass eventually falling for Toffolo arriving at pace to strike a sweet first-time effort into the side netting.
After a fiery start to the second half that saw Rovers captain Darragh Lenihan booked for a late lunge on Lewis O'Brien, Town took the lead through a simple set-piece. Sarr shrugged off his markers and buried a thumping header past Kaminski.
The goal prompted a triple change from Rovers boss Tony Mowbray, who threw on Bradley Dack, John Buckley and Sam Gallagher, and it looked to have paid off.
The lively Armstrong broke clear down the left and his cross-shot was parried by Schofield for Armstrong to tap home.
But as a relieved Rovers celebrated their point, Sarr arrived in the box to collect Pipa's wonderful pass and fire his second to win it.