Schalke snatched a place in the last 16 of the UEFA Champions League as substitute Max Meyer gave them a 1-0 win at Maribor.
Chelsea's defeat of Sporting Lisbon meant that a victory was enough for Roberto Di Matteo's side to qualify from Group G in second place.
The Bundesliga outfit had recovered from a 5-0 thrashing by the pool winners at Stamford Bridge to claim emphatic wins over Mainz and Stuttgart in domestic action.
However, having been held to a 1-1 draw by Maribor at the Veltins Arena back in September, they were ready for a tough test for the return clash in Slovenia, especially with a volatile home crowd in such good voice.
Schalke's patient approach failed to pay dividends in the first half, with the visitors having plenty of possession but lacking penetration up front as Maribor went closest to breaking the deadlock through Marcos Tavares.
The normally reliable Klaas-Jan Huntelaar wasted a golden opportunity when hitting the woodwork from close range soon after the break, but Meyer spared his blushes when taking advantage of a goalkeeping error to net the winner with 28 minutes left.
Maribor defender Petar Stojanovic played in a mask to protect his broken nose, while Agim Ibraimi returned up front for the Slovenians and Aleksander Rajcevic replaced Marko Suler at the back.
Schalke, with Di Matteo again favouring a 3-5-2 formation and Marco Hoger getting the nod ahead of Meyer, were without a host of injured players, including Julian Draxler, Jefferson Farfan and Kevin-Prince Boateng.
Ibraimi had a half-chance for the hosts 10 minutes in after being picked out by Mitja Viler but his shot was wild and wide, while Schalke goalkeeper Ralf Fahrmann comfortably dealt with a long-range Tavares effort.
However, Maribor went close to making a breakthrough when a Soares Arghus header was blocked by Atsuto Uchida, who then had to react quickly to keep out Tavares' shot on the rebound.
At the other end, Eric Maxim Choupo-Moting went to ground in the box but referee Szymon Marciniak correctly waved play on, while Huntelaar blazed his shot well over the crossbar on the break as a tight first period ended in stalemate.
Schalke tried to up the tempo at the start of the second half, but a couple of early corners and a free-kick whipped into the box came to nothing and they were almost hit on the break by the lively Tavares.
Huntelaar then missed a great chance to break the deadlock after 55 minutes when a ricochet off Tranquillo Barnetta fell to him eight yards out but his scuffed shot hit the post and was then cleared by Rajcevic as the ball rolled back along the line.
The visitors were ahead seven minutes later, though, when goalkeeper Jasmin Handanovic poorly parried a Hoger cross and substitute Meyer, recently on for Barnetta, coolly slotted the ball home.
The home supporters did their best to rally Maribor, but Schalke grew in confidence once in front and restricted their opponents to long-range attempts as the Germans held on to book their spot in the knockout rounds.comments