Stuttgart ruined Schalke's potential Champions League qualification party on the day the hosts' coach Jens Keller extended his contract with a 2-1 win at the Arena AufSchalke.
Vedad Ibisevic's double helped the Swabians take all three points and leave Schalke needing to avoid defeat on the final day of the season in a Champions League decider against Freiburg to achieve their aim for the season.
An own goal from Georg Niedermeier in the last minute was too little too late for the Royal Blues, who hold on to fourth place by a single point.
Keller signed a new deal until 2015 earlier today and he is on the brink of leading a side in Europe's elite club competition again next year.
``We are convinced in his work,'' said Schalke's director of sport Horst Heldt. ``He follows a concept which he has convinced not only the players but also the decision-makers at the club with.''
He had failed to convince Stuttgart of his worth two years ago when he sat on their bench for a matter of months as a replacement for Christian Gross before being replaced by their current coach Bruno Labbadia.
And it was Labbadia's side who did all the convincing at the Arena AufSchalke.
Ibisevic headed a Christian Molinaro cross just over the bar in the 15th minute as the DFB-Pokal finalists proved they wanted to make amends for a defeat to relegated Greuther Furth a week ago.
Alexandru Maxim then caught Timo Hildebrand out with an effort from long range, but he also just missed the target.
The visitors took a deserved lead in the 24th minute when Ibrahima Traore's cross from the left set up Ibisevic, who stuck his foot out to divert the ball past Hildebrand.
Jermaine Jones tested Sven Ulreich for the first time in the 39th minute, but the hitherto untested Stuttgart custodian was not going to be beaten.
A few more half-chances went begging before the home fans started to get frustrated.
Stuttgart could have doubled their lead when Traore's shot from a tight angle was saved by Hildebrand and Ibisevic sent the rebound over.
He made no mistake just a few minutes later, though, when he provided a cool finish to a quick counter attack after being set up by captain Christian Gentner.
Schalke threw everything forward, but Stuttgart held firm until stoppage time when Huntelaar's cross was turned into his own goal by Niedermeier.
However, that was not enough to avoid a defeat which leaves Schalke with the prospect of a trip to the Black Forest next week where they need to avoid defeat to hold on to fourth place.