St Johnstone beat Luzern 5-4 on penalties on a dramatic night at McDiarmid Park to book their place in the third qualifying round of the Europa League.
Steven MacLean, Liam Caddis, Dave Mackay, Stevie May and Tam Scobbie all scored in the shoot-out, with Allan Mannus saving from Marco Schneuwly.
May converted a penalty midway through the first half to give the Perth side the lead but Schneuwly equalised early in the second period to make it 1-1 on the night and 2-2 on aggregate.
St Johnstone now face Spartak Trnava of Slovakia and manager Tommy Wright said: "For us to beat the likes of Rosenborg and Luzern two years running is fairytale stuff.
"It shouldn't happen, really but it has - through a determination, a spirit, a togetherness, organisation, a wee bit of luck at times and a wee bit of quality at times.."
Meanwhile, Motherwell suffered a 3-2 defeat after extra time to Icelandic side Stjarnan, going out 5-4 on aggregate.
Stuart McCall's men were twice ahead through Steven Hammell and Lionel Ainsworth but Olafur Finsen netted from the spot, Rolf Toft struck with five minutes left and Atli Johansson scored in the second period of extra time.