THEY say, what goes around, comes around.

Four years ago, a little-known substitute by the name of Andy Gouck etched his name into Accrington Stanley folklore with a last-gasp strike that saw the newly promoted Conference side dump Huddersfield Town out of the FA Cup.

The Huddersfield hearts were well and truly broken by John Coleman and his shock troops, who went on to beat Bournemouth, before eventually succumbing in a replay against Colchester.

Unfortunately for the Reds history was in no mood to repeat itself in their favour on Saturday.

Instead, the tables were turned in agonising fashion as the Terriers got their own back on their East Lancashire hosts.

Again it was from the boot of a substitute late on that the winner was struck - but this time the hero of the hour was Luke Beckett, and he was wearing blue and white.

Former Burnley defender and Town captain Frank Sinclair led the celebrations on the final whistle along with the large band of traveling supporters behind Ian Dunbavin's goal.

But their cheers were ones of relief as much as delight, because they know their side got out of jail.

For 45 minutes the magic of the FA Cup was well and truly on show at the Fraser Eagle Stadium as the minnows' from League Two outplayed their League One opponents.

And they had a well-deserved two-goal lead to show for their endeavors.

Captain Peter Cavanagh had got the show underway as he waved his magical right foot to send a free kick over the Terriers' wall and into the top left-hand corner, to nestle inch perfect between crossbar and post.

And things just got better when striker Roscoe Dsane did his best disappearing act to glide away from Nathan Clarke who had slipped in the centre circle.

When he squared the ball for Paul Mullin - hey presto, Stanley were two goals to the good!

But Terriers boss Andy Ritchie still had a few tricks up his sleeve and on the stroke of half-time former Port Vale winger Malvin Kamara got in on the act to pull a goal back.

A second for Kamara and Beckett's winner and the show was over for the Reds for another year.

And Stanley boss Coleman didn't like it. Not a lot. Not at all.

He said: "It's very frustrating because we were the better team and you only have to look at the celebrations of their players and fans at the end, they know they got out of jail and their celebrations were like they'd won the FA Cup. Fair play to them because I would have been made up if we'd come back from three goals down.

"It's the manner in which we lost that's hard to bear.

"And when you don't progress you have to look at the next round like a kid with his nose pressed up against the window and it's hard to take."

It is especially hard to take in the circumstances.

The Reds made two changes from the side that beat their Lancashire rivals Morecambe, with Leam Richardson coming in for veteran Graham Branch and on-loan midfielder Ian Craney left out on the orders of his club Swansea, who obviously didn't want the Scouser cup-tied for any potential suitors in the January transfer market.

Ironically, after an even start to the match, it was a free kick that would possible have been taken by Craney that opened the scoring.

David Brown made a nuisance of himself on the edge of the area and Andy Holdsworth chopped him down.

Up stepped Cavanagh and seconds later the Reds faithful were delirious.

The skipper took a short run-up and curled a sublime shot into the stantion of the goal, before setting off to celebrate with his manager on the sideline.

But there were no thoughts whatsoever of sitting back and resting on their advantage as Stanley continued to attack.

And Dsane could have doubled their lead when he held off two defenders, but had his shot blocked by Matthew Glennon.

However, the former AFC Wimbledon frontman turned provider minutes later to send Stanley into dreamland.

Town were defending high up the pitch and paid the price when Clarke lost his footing to send Dsane clear. The nippy frontman showed a clean pair of heels and unselfishly played the ball across for Mullin to net his eighth goal of the season.

It was no more than they deserved as their three-man defence of Sean Webb, Mark Roberts and Robbie Williams kept things tight, while Cavanagh and Richardson burst up the flanks.

Midfielders Andy Procter, Jay Harris and David Brown were nothing short of tackling and passing machines in the centre, while up front, Mullin was a colossus in the air, winning everything, and Dsane was causing David Mirfin and Clarke all sorts of problems.

Such was the way until deep into added-on time at the end of the first half, when Kamara, Hudderfield's only danger man of the opening 45 minutes, turned Roberts too easily, raced in on goal and buried the ball past Dunbavin to reduce the deficit.

But even after the re-start, the backs-to-the-wall defending that served Stanley so well in midweek, was proving equally as effective.

And Dsane could even have made it three from a similar position to Kamara's, but his shot was touched agonisingly wide by Glennon.

Cavanagh had another free-kick on the hour mark that, this time, sailed over the bar.

But it was at the other end that the majority of the action was taking place.

Still though, the Terriers couldn't get the breakthrough as Dunbavin leaped spectacularly to his side to touch a Beckett effort round the post.

But just as it looked like the impossible could become possible again, Town levelled, when a clearance found Kamara on the edge of the box and his half-volley flew into the back of the net.

Dunbavin again came to his side's rescue minutes later to deny Sinclair, but there was nothing he could do to prevent the winner.

With two minutes left on the clock, Procter lost the ball on the edge of the Terriers' area and they broke with a vengeance.

Williams made an uncharacteristic poor clearance, Holdsworth fed the ball through to Beckett and he steered his shot in off the post Procter had a chance to redeem himself deep in injury time, but his header was sent wide.