Aberdeen set up a Europa League clash with Real Sociedad after first-half goals from Adam Rooney and Niall McGinn earned them a memorable 2-1 win over Groningen in Holland.
Aberdeen knew that an away goal would be crucial following a goalless Pittodrie clash and they got it 26 minutes into the second leg of the second qualifying round when Rooney converted a penalty.
McGinn followed up after Rooney hit the bar seven minutes later and Aberdeen looked like strolling through.
But Maikel Kieftenbeld pulled one back just before the break and Aberdeen had to ride out some uncomfortable periods in the second half.
But a defence supplemented with Andrew Considine, who started in place of Barry Robson, held firm to the delight of their travelling fans.
The game started frantically and Aberdeen needed Jonny Hayes to clear off the line from Tjaronn Chery following a corner before Rooney raced clear at the other end but could not beat the goalkeeper.
The hosts were soon on the attack again and Filip Kostic shot wide from a good chance.
Jonny Hayes had a shot saved at the second attempt before the Dons won a penalty when Kieftenbeld fouled Peter Pawlett. Rooney, who netted five goals in the first-round win over Daugava Riga, stepped up to convert the spot-kick.
Rooney almost grabbed his seventh goal of the season when he latched on to Willo Flood's through-ball.
With the Dutch defenders standing waiting for an offside flag, the Irishman lobbed the goalkeeper and was unlucky to see his effort bounce off the bar. But McGinn was quick to follow up and he kept his composure to drill home.
The home fans were silenced and Aberdeen began knocking the ball around.
Chery came close with a first-time effort from 25 yards but the Dons were looking comfortable and Rooney almost got on the end of McGinn's flick.
But the game changed in the 44th minute when Kieftenbeld got in between Russell Anderson and Shay Logan to meet Nick van der Velden's deep cross. The skipper headed inside Jamie Langfield's near post and, although the goalkeeper made a decent attempt to save, the ball was well over the line before he clawed it away.
Groningen came flying out of the blocks after half-time and sent in a number of crosses but the Dons survived and the hosts made their third change on the hour mark.
They soon created a great chance when Anderson was caught underneath a cross and Van der Velden laid the ball off to Michael de Leeuw, but Langfield was quick to react and stopped the shot with his trailing leg.
De Leeuw soon got on the end of a ball over the top but guided a difficult volley wide and Aberdeen had a decent spell which culminated in Considine having a header saved.
Groningen soon put the pressure back on and Aberdeen were slightly fortunate not to concede a penalty when Anderson barged into the back of De Leeuw.
The Dons wasted some decent counter-attack possibilities and Langfield made several decent stops, all of them from long-range strikes.
But Ryan Jack came closest in the closing stages when his shot was deflected wide after a wonderful run from Hayes.