Huddersfield held on despite a second-half fightback from Peterborough to book their place in the Johnstone's Paint Trophy area quarter-finals.
Graham Carey gave the Terriers an early lead when his 25-yard shot crept through Posh keeper Joe Lewis's legs.
Anthony Pilkington then struck from 20 yards before beating three defenders to curl his second past Lewis.
Aaron Mclean and Mark Little both headed home after the break to give Posh hope but Huddersfield held on.
Huddersfield Town assistant manager Terry McDermott told BBC Radio Leeds: "We've got aspirations to go to Wembley this year, it would be fantastic for the fans, and we're absolutely delighted to have won the game.
"Our first half performance was very, very good against a strong team, and I thought the lads that came in did a great job today.
"We could have been four or five up, and then the second half was a different game - they made us work hard and what pleased me more than anything was that the players showed much this club means to them."
Peterborough United boss Gary Johnson told BBC Radio Cambridge: "Unfortunately, we had a couple of poor mistakes that led to goals.
"Huddersfield came out of the traps well and we gifted them the first goal.
"In the second half we needed to change the mental state so we made three substitutes at half time."
Live text and stats
Tuesday, 5 October 2010
05 P Clarke
36 Carey (Croft 72)
19 Lee (Rhodes 67)
06 N Clarke,
05 Zakuani (Davies 46)
19 Mendez-Laing (Tomlin 46)
15 Hibbert yellow card (Mclean 46)
Ref: MathiesonAtt: 2,904
Attempts on target
Attempts off target
90:00+3:27 The referee brings the game to a close.
90:00+2:08 The referee gives a free kick against Mark Little for handball. Free kick taken by Joey Gudjonsson.
90:00+1:20 Kelvin Langmead concedes a free kick for a foul on Lee Novak. Antony Kay takes the free kick.
87:44 Effort on goal by Jordan Rhodes from just inside the penalty area goes harmlessly over the target.
86:19 Assist on the goal came from Lee Tomlin.
86:19 GOAL - Mark Little:Huddersfield 3 - 2 Peterborough Mark Little finds the net with a headed goal from close in. Huddersfield 3-2 Peterborough.
81:17 Shot by Lee Frecklington from outside the box goes high over the target.
80:34 Unfair challenge on Lee Frecklington by Damien Johnson results in a free kick. Free kick taken by Seth Nana Ofori-Twumasi.
79:21 Inswinging corner taken by George Boyd, Ian Bennett makes a save.
77:43 Peter Clarke gives away a free kick for an unfair challenge on Aaron Mclean. Lee Tomlin takes the direct free kick.
76:27 Inswinging corner taken right-footed by Lee Frecklington from the left by-line, save by Ian Bennett.
76:06 Inswinging corner taken by George Boyd.
75:41 Corner taken left-footed by George Boyd, clearance by Jordan Rhodes.
74:57 Lee Croft is penalised for a handball. Free kick taken by Seth Nana Ofori-Twumasi.
73:23 Jordan Rhodes takes a shot. Save by Joe Lewis.
71:06 Substitution Lee Croft on for Graham Carey.
68:35 Inswinging corner taken by Lee Tomlin from the left by-line, Aaron Mclean takes a shot. Save by Ian Bennett.
66:32 Substitution Jordan Rhodes on for Alan Lee.
Correction - 65:59 Lee Novak concedes a free kick for a foul on Kelvin Langmead. Joe Lewis takes the free kick.
65:59 Free kick awarded for an unfair challenge on Kelvin Langmead by Lee Novak. Indirect free kick taken by Joe Lewis.
65:07 Lee Novak is caught offside. Joe Lewis takes the indirect free kick.
64:30 Lee Tomlin takes a shot. Save by Ian Bennett.
62:57 Aaron Mclean produces a right-footed shot from just outside the box that misses to the right of the goal.
61:04 The referee gives a free kick against Lee Frecklington for handball. Direct free kick taken by Damien Johnson.
59:34 Damien Johnson takes a shot from just outside the penalty area clears the crossbar.
58:45 The offside flag is raised against George Boyd. Indirect free kick taken by Ian Bennett.
57:36 The official flags Lee Novak offside. Joe Lewis takes the free kick.
56:00 Lee Novak concedes a free kick for a foul on Mark Little. Joe Lewis takes the free kick.
53:57 Corner taken right-footed by Joey Gudjonsson from the left by-line, Charlie Lee makes a clearance.
53:20 Inswinging corner taken by Graham Carey from the right by-line, clearance made by Kelvin Langmead.
51:59 Outswinging corner taken left-footed by Graham Carey, Kelvin Langmead manages to make a clearance.
51:33 Outswinging corner taken left-footed by Graham Carey, clearance made by Kelvin Langmead.
51:23 Lee Novak takes a shot. Save by Joe Lewis.
50:09 Assist on the goal came from Lee Tomlin.
50:09 GOAL - Aaron Mclean:Huddersfield 3 - 1 Peterborough Aaron Mclean scores a headed goal from inside the area. Huddersfield 3-1 Peterborough.
48:43 The referee blows for offside. Ian Bennett restarts play with the free kick.
47:20 Craig Mackail-Smith has an effort at goal from deep inside the area missing to the right of the goal.
46:39 Joey Gudjonsson fouled by George Boyd, the ref awards a free kick. Direct free kick taken by Graham Carey.
45:17 Lee Tomlin takes a shot from close range clearing the crossbar.
45:01 The referee gets the second half underway.
45:01 Substitution Nathaniel Mendez-Laing goes off and Lee Tomlin comes on.
45:01 Substitution Dave Hibbert goes off and Aaron Mclean comes on.
45:01 Substitution (Peterborough) makes a substitution, with Arron Davies coming on for Gabriel Zakuani.
45:00+3:10 The ref blows to end the first period.
45:00+2:27 Charlie Lee gives away a free kick for an unfair challenge on Damien Johnson. Ian Bennett takes the indirect free kick.
45:00+1:39 Craig Mackail-Smith is ruled offside. Indirect free kick taken by Ian Bennett.
45:00+0:46 Shot from just outside the penalty box by Anthony Pilkington misses to the left of the target.
42:09 Corner taken by George Boyd from the right by-line, save made by Ian Bennett.
38:47 Unfair challenge on Charlie Lee by Alan Lee results in a free kick. Gabriel Zakuani takes the indirect free kick.
38:20 Shot from just outside the box by Joey Gudjonsson misses to the left of the target.
36:37 Nathaniel Mendez-Laing takes a shot from just outside the penalty area clears the crossbar.
35:51 Charlie Lee produces a right-footed shot from just outside the area that goes harmlessly over the target.
34:28 Foul by Dave Hibbert on Antony Kay, free kick awarded. Antony Kay takes the free kick.
34:28 Booking Dave Hibbert booked for unsporting behaviour.
32:02 Lee Peltier takes a shot. Joe Lewis makes a save.
31:29 George Boyd concedes a free kick for a foul on Joey Gudjonsson. Free kick taken by Joey Gudjonsson.
29:13 Free kick awarded for a foul by Liam Ridehalgh on Gabriel Zakuani. George Boyd has an effort direct from the free kick.
28:13 Free kick awarded for a foul by Charlie Lee on Alan Lee. Damien Johnson takes the direct free kick.
27:53 George Boyd takes a shot. Ian Bennett makes a comfortable save.
27:13 Effort from deep inside the area by Kelvin Langmead misses to the right of the goal.
23:27 Assist by Lee Peltier.
23:27 GOAL - Anthony Pilkington:Huddersfield 3 - 0 Peterborough Anthony Pilkington fires in a goal from long distance to the bottom left corner of the goal. Huddersfield 3-0 Peterborough.
22:41 Free kick awarded for an unfair challenge on Damien Johnson by Dave Hibbert. Free kick taken by Antony Kay.
22:21 Close range header by Alan Lee goes over the bar.
19:09 Corner taken by Graham Carey from the right by-line to the near post, Seth Nana Ofori-Twumasi manages to make a clearance.
18:52 Lee Novak takes a shot. Kelvin Langmead gets a block in.
16:36 Anthony Pilkington fouled by Seth Nana Ofori-Twumasi, the ref awards a free kick. Damien Johnson restarts play with the free
13:23 Unfair challenge on Charlie Lee by Alan Lee results in a free kick. Seth Nana Ofori-Twumasi takes the indirect free kick.
11:44 GOAL - Anthony Pilkington:Huddersfield 2 - 0 Peterborough Anthony Pilkington grabs a goal from just outside the box to the top left corner of the goal. Huddersfield 2-0 Peterborough.
8:38 George Boyd takes a shot. Save made by Ian Bennett.
5:51 GOAL - Graham Carey:Huddersfield 1 - 0 Peterborough Graham Carey finds the net with a goal from long distance low into the middle of the goal. Huddersfield 1-0 Peterborough.
5:20 Free kick awarded for a foul by Dave Hibbert on Antony Kay. Ian Bennett takes the free kick.
1:28 George Boyd produces a left-footed shot from just outside the penalty box that misses to the left of the target.
0:00 The game gets underway.
Live text and data provided by The Press Association.
This page is best viewed in an up-to-date web browser with style sheets (CSS) enabled. While you will be able to view the content of this page in your current browser, you will not be able to get the full visual experience. Please consider upgrading your browser software or enabling style sheets (CSS) if you are able to do so.