Burnley will re-live their halcyon days of trips to continent, but only after emerging bloodied and brusied from a European tie made in Britain.

Jack Cork’s header and Ashley Barnes’s penalty ultimately edged Sean Dyche’s side past a game and unrelenting Aberdeen. Burnley will play Istanbul Basaksehir in the next round of Europa League qualifiers and make their first sojourn abroad in 51 years.

Yet when 18-year-old Lewis Ferguson scored the first and what will likely be the finest goal of his young career – a stunning, first-half bicycle kick to cancel out Chris Wood’s opener – that did not seem so certain.

On another night, it could easily have been Aberdeen and their supporters packing their passports and celebrating their escape from an evenly-matched, fiercely-contested and often thrilling tie. It was not to be.

Aberdeen’s travelling support congregated on the cricket pitch that sits adjacent to Turf Moor before kick-off, swilling beer and singing boisterously, but once safely inside the ground they initially found little to cheer about. ​McInnes’ side did not start with the same intensity they showed seven days earlier at Pittodrie, and the seven-minute mark had not even passed before Burnley moved ahead on aggregate.

An Aberdeen throw-in inside their own half should not have allowed Burnley in, but Graeme Shinnie found himself easily dispossessed by Ashley Westwood, who went in search of Wood with a ball over the top. Wood’s first touch off the outside of his thigh bought him time to turn, round a marooned Joe Lewis and fire high into the roof of the net, past the two defenders on the goal-line.

Lewis made several important saves (Getty)

Burnley briefly demonstrated to their visitors why Turf Moor is regarded as among the most testing of away trips south of the border, controlling the ebb and flow of play, snuffing out all openings. The hosts were comfortable and it would take something special for Aberdeen to edge themselves back into this tie. Ferguson found it.

His equaliser was spectacular but a soft one to concede. Gary Mackay-Steven’s cross to far post would usually be meat and drink for a side organised by Sean Dyche, but Wood headed back across the penalty area rather than out and away. The ball was dropping behind Ferguson, but the teenager’s amateur acrobatics allowed him to convert past Anders Lindegaard.

For a brief moment, there was quiet, as though Turf Moor could not quite comprehend what it had just witnessed, but the time Ferguson had lifted himself up off the turf though, the away end was wild.

Dyche, meanwhile, has rarely looked as incandescent after seeing his side concede, and he was left only more unimpressed by how Burnley ended the half. As at Pittodrie, the wing play of Mackay-Steven and Niall McGinn was exploiting a weakness, stretching a defence that prefers to play narrow.

Wood, scorer of Burnley’s goal turned provider for Aberdeen’s, was removed at the break. Two minutes from the re-start, Johann Berg Gudmundsson almost found the response Dyche had presumably demanded but Lewis’s fingertips turned the Icelander’s strike around the near post.

Barnes sealed progression with his penalty (Getty)

Lewis, somewhat culpable for the ease of Wood’s opener, did more than enough to atone after the break. Wood’s replacement Ashley Barnes was denied superbly by the Aberdeen goalkeeper, who dived left but turned a swerving shot over with his trailing right arm.

Sam Vokes, scorer of Burnley’s late equaliser at Pittodrie, believed he had come up with the goods again when connecting with a cross from wide, but the ball cannoned off the crossbar and was scrambled clear. Replays showed Lewis, once again, had diverted the ball with a faint but crucial touch.

Lewis, however, could do little about the decisive goal when it came. Aberdeen had dealt with crosses like Charlie Taylor’s all night but, in the 101st minute, Cork slipped through the lines of their defence to rise and flick the ball on into the far corner.