Schalke shifted the pressure from their coach Felix Magath onto Bayern Munich coach Louis van Gaal with victory over the Bundesliga champions at the Arena AufSchalke.
Jose Manuel Jurado put the Royal Blues in front in the 58th minute after the home side had weathered a first-half storm, thanks to the heroics of their goalkeeper Manuel Neuer.
Benedikt Howedes then sealed the win midway through the second half to lift Schalke four points clear of the bottom three and leave Bayern still 14 points adrift of the league leaders Borussia Dortmund, who are in action against Nurnberg tomorrow.
Bayern started brightly and Franck Ribery missed their first chance in the 21st minute, shooting wide of the post.
A minute later Bastian Schweinsteiger tested Neuer for the first time with a stinging volley that the Schalke goalkeeper, who is reported to still be a Bayern target, tipped behind for a corner.
Mario Gomez missed Bayern's next chance after half an hour when he was found inside the area by Schweinsteiger, but he shot just wide of the post from a dangerous position.
Neuer then made another impressive save to deny Toni Kroos and ensure his side were still in the game at the interval.
The second half was a different story entirely and Schalke went in front in the 58th minute.
Neuer punted the ball long for Raul, who beat Breno in the penalty area and somehow managed to find Jurado in the middle, and his powerful shot went in off the inside of the post.
The woodwork also played a part in Schalke's second goal, which was scored at the second attempt by a determined Howedes.
He rose to meet Peer Kluge's cross and head the ball against the inside of the right-hand post, and he was the quickest to react as he followed in to tap it in from point-blank range.
Neuer denied Gomez a consolation goal in stoppage time as the Arena erupted to celebrate Schalke's fourth victory of the season, and a much-needed one at that.