Aberdeen swept into the last 32 of the Uefa Cup after two goals from Jamie Smith against Copenhagen helped secure third spot in qualifying Group B.
Smith was celebrating two goals against Copenhagen
Copenhagen, who arrived needing just a draw to go through at Aberdeen's expense, were on top before the break.
But Smith's superb volley from 25 yards put the Dons in front after 47 minutes.
Smith shot home from the edge of the box, Mikael Antonsson turned the ball into his own net following a Lee Miller cross and Ricky Foster fired a fourth.
In the end, it was a thoroughly deserved first victory in Europe this season for the Dons, who had qualified on the away goals rule and then only drawn one of their other three group games.
Home boss Jimmy Calderwood had made three changes from the side that lost 3-0 to Motherwell at the weekend.
Andrew Considine, Sone Aluko and fit-again Smith returned to the starting line-up, replacing Karim Touzani, Steve Lovell and the injured Derek Young.
And Aberdeen created the first opening following Zander Diamond's long ball, only for Miller to mis-hit his shot across the face of goal from the edge of the box.
Copenhagen were peppering the Dons goal with long-range efforts and Atiba Hutchinson was closest with a drive that flew just over from 20 yards.
Former Chelsea winger Jesper Gronkjaer, who had been missing for a month with a hamstring injury, returned for Copenhagen and fired straight at goalkeeper Jamie Langfield from a difficult angle after a quick and incisive break.
A last-ditch challenge from Richie Byrne was required to thwart Libor Sionko as the former Rangers winger escaped the Dons' offside trap and Gronkjaer fired another chance into the side-netting.
Foster put the icing on the cake with the fourth goal
The half-time whistle blew without goalkeeper Jesper Christiansen, the other former Ibrox man in the visitors' line-up, being tested.
However, that was remedied three minutes after the break, with the Dons seemingly under instruction to loft high balls towards the centre of a fragile Danish defence.
Copenhagen were slow to react to a Langfield punt, it sat up nicely for Smith and he lofted his volley over the stranded Christiansen from 25 yards.
Miller delivered the high ball eight minutes later and Smith took his time before drilling it low across the face of Christiansen and into the far corner of the net from 18 yards.
The former Celtic winger missed an easier chance to complete his hat-trick but found the side-netting after being put clear following Michael Hart's superb run and through ball.
Aberdeen's third eventually came after 71 minutes, when Miller did superbly to beat his marker and turn the ball across goal, where Antonsson deflected it into his own net.
Ailton Almeida fired against a Dons post, but any hopes of a late comeback were dashed after 82 minutes.
Foster fired home from close range following a low cross from fellow substitute Chris Maguire to complete a night of celebration at Pittodrie.
Aberdeen: Langfield, Hart, Byrne, Diamond, Considine, Nicholson, Severin, Clark, Aluko (Foster 59), Miller, Jamie Smith (Maguire 74).
Subs Not Used: Soutar, Lovell, Touzani, Daniel Smith, Mair.
Goals: Jamie Smith 47, 55, Antonsson 71 og, Foster 83.
FC Copenhagen: Christiansen, Kvist, Gravgaard, Antonsson, Wendt, Sionko, Norregaard (Silberbauer 61), Wurtz (Almeida 58), Hutchinson, Allback, Gronkjaer (Nordstrand 70).
Subs Not Used: Coe, Jensen, Bertolt, Jorgensen.
Booked: Gravgaard, Wurtz.
Ref: Lucilio Cardoso Cortez Batista (Portugal)