A late strike from Adam Szalai saw 10-man Schalke beat PAOK 3-2 on Tuesday night and record a 4-3 aggregate victory to book its place in the group stage of the Champions League.
The striker got the first of two goals in the 43rd minute when he prodded home a left-footed shot from inside the area, only for Stefanos Athanasiadis to equalize in the second period before Jermaine Jones was sent off for the visitors.
Julian Draxler then restored Schalke's lead, but PAOK drew level for a second time through Konstantinos Katsouranis. However, Szalai had the final say to deny the home side its first appearance in the Champions League group stage.
Schalke brought in Atsuto Uchida and Felipe Santana in the back following its 2-1 Bundesliga defeat to Hannover over the weekend, while Jefferson Farfan, its goal-scorer in the first leg, returned on the right.
PAOK coach Huub Stevens, going up against his former club, recalled Dimitris Salpingidis and Stefanos Athanasiadis to his front line after the pair started on the bench in their side's 2-0 defeat to Panaitolikos on Saturday.
Schalke is yet to win a game in the Bundesliga game this season but started well and was the first to threaten. Just two minutes in, Jones headed down at goal from a corner only for Jacobo to save well with his feet.
However, the home side regrouped and applied pressure of its own, despite not having any fans to cheer the side on at the Toumba Stadium, as its supporters served the first of a three-game ban following crowd trouble during a Europa League tie with Rapid Vienna last year.
Just as it looked as though neither side would find a breakthrough before the halftime whistle, Szalai found the back of the net for the visitors. Uchida poked a ball into the Hungarian's path and he nudged a shot past Jacobo with his left foot to give the German side the lead.
PAOK drew level just eight minutes after the break as Athanasiadis was played in by Stelios Kitsiou and slipped the ball past Hildebrand.
Schalke's cause was hindered by Jones's dismissal in the 64th minute after he received a second yellow card for a foul on Salpingidis, but Draxler's tidy finish three minutes later put Schalke ahead once again. The 19-year-old was slipped in by Meyer, with the Germany international rounding Jacobo before slotting home to make it 2-1.
PAOK was not finished, though, and equalized again through Katsouranis, as the center back got his head to a Stoch free kick and looped his effort over Hildebrand and into the net.
But in the last minute, the home side's hearts were broken as Draxler cut in from the right and put it on a plate for Szalai to side-foot home and conclude a thrilling encounter.