Cardiff City had 29% possession against a Huddersfield side who were looking to recover from back to back away defeats in the Championship but despite dominance of the ball the visitors were undone by a first half treble as Cardiff City won for the third time in six games under Neil Warnock.
The first two goals came two minutes apart as first Sean Morrison met Peter Whittingham's corner kick to give Cardiff a headed lead and moments later a bit of trickery from Junior Hoilett saw Neil Warnock's new signing finish after Anthony Pilkington's effort was parried by the Huddersfield keeper. Hoilett had set up Pilikington for the shot and reacted quickest when the ball ran loose.
Huddersfield are no mugs and enjoyed lots of possession and a well worked move saw Tommy Smith scoring after a Kasey Palmer pass.
But Cardiff kept looking to get the ball in the box and Lee Peltier's free kick was met by Morrison and his header was turned goalbound by Rickie Lambert.
City's endeavour had given them a deserved lead but the second half became a defensive operation as Hudderfield increased their dominance of the ball and they made it a very nervous final 20 minutes when substitute Philip Billing executed a superb volley from 20 yards out.
Huddersfield pushed but City held firm and for all the possession the visitors didn't trouble Ben Amos too much.
Fred Gounongbe came off the bench to replace Lambert and while he didn't have a shot on goal he did add pace as City looked to break and he won some important free kicks that ate into the minutes as the clock ticked down.
After two defeats in a row it was a massive three points for Cardiff who next up face Aston Villa and then Brighton.