Bruno Fernandes netted an extra-time penalty as Manchester United edged past Copenhagen and into the semi-finals of the Europa League with a 1-0 win.
United secured UEFA Champions League qualification through their Premier League position but headed to Germany hoping to secure a first piece of silverware for Ole Gunnar Solskjaer as manager.
The Old Trafford outfit were frustrated for long periods on Monday, struggling to negotiate the woodwork, a series of VAR reviews that repeatedly found fairly in Copenhagen's favour and a remarkable display from goalkeeper Karl-Johan Johnsson.
But Stale Solbakken's side - playing their first major European quarter-final - could not hold out and, with Anthony Martial in inspired form, Fernandes settled the one-legged tie with 95 minutes on the clock.
United survived a couple of early scares, but they then looked to have been awarded a spot-kick as Martial was bundled over, only for a VAR check to identify an offside against Harry Maguire in the build-up.
The technology went against United again in first-half stoppage time. Mason Greenwood raced through and fired into the net via the post but, like Maguire, had been stationed beyond the last defender.
That same theme continued after the break as Greenwood's shot bounced back out off the foot of the post and Marcus Rashford, on the rebound, was flagged offside when he routinely netted.
And the woodwork foiled United once more with 27 minutes remaining as Fernandes sent a dipping drive cannoning into the opposite upright.
But then Martial came to the fore. Johnsson got a strong right hand to a swirling strike and the United forward was denied a dazzling solo effort by Victor Nelsson's crunching last-gasp challenge that took the match into extra-time.
Johnsson blocked with his legs as Martial prodded goalwards from a tight angle and then won that battle again as the dominant striker danced through.
The goalkeeper's hard work was swiftly undone, though, as Andreas Bjelland knocked Martial to the ground and Fernandes proved clinical from the penalty spot.
Johnsson was determined to keep Copenhagen in contention and saved smartly from Mata, then instinctively from Fernandes and finally, with the end of his toe, from Mata once more. It was not enough to rescue a result.
What does it mean? Red Devils survive rollercoaster
United started the match by gifting Copenhagen two presentable chances, while they astonishingly netted only once, but this developed into an encouraging performance.
Admittedly against tiring opponents, Solskjaer's men controlled the tempo and created chance after chance, clinching a fine if frustrating win.
Martial both mesmerising and maddening
The best and worst of United's number nine was in evidence as he rose to the occasion but somehow failed to score. Relatively quiet until the closing stages of normal time, Martial soon had the ball on a string as he weaved in and out of despairing challenges, only to find Johnsson his equal time and again.
Contest catches up with Copenhagen
The underdogs were good value for parity through 80 minutes, even as they rode their luck, with United enduring the odd nervy moment at the other end.
But their exertion eventually told as Bjelland conceded a slightly harsh penalty. Johnsson was required to make a ludicrous 13 saves by the final whistle.
United are through to face either Wolves or Sevilla, semi-final opponents against whom they surely cannot afford to be so profligate.