Luke Beckett scored a late winner as Huddersfield came from two goals down to avoid a shock at Accrington Stanley.
Stanley were 2-0 up in 30 minutes through Peter Cavanagh's 20-yard free-kick and Paul Mullin's tap-in.
In reply, Malvin Kamara fired home on the stroke of half-time and then hit a left-footed equaliser eight minutes from the end.
When Andy Holdsworth rattled a post in the dying minutes, Beckett slotted in the rebound to secure a dramatic win.
Accrington Stanley: Dunbavin, Williams, Roberts, Webb, Cavanagh, Richardson (McEvilly 88), Proctor, Harris, Brown (Miles 90), D'Sane (Whalley 84), Mullin.
Subs Not Used: Fearon, Carden.
Goals: Cavanagh 12, Mullin 25.
Huddersfield: Glennon, Sinclair, Skarz (Beckett 74), Mirfin, Nathan Clarke, Kamara, Holdsworth, Wallwork, Schofield (Collins 61), Booth, Cadamarteri.
Subs Not Used: Smithies, Young, Killock.
Goals: Kamara 45, 83, Beckett 89.
Ref: Michael Oliver (Northumberland).