Julian Draxler struck the winner for Schalke 04 with eight minutes left on the clock against Borussia Monchengladbach to cement Die Konigsblauen's place in the Bundesliga's top four.
The hosts almost took the lead in the 10th minute when Klaas-Jan Huntelaar's near-post flick towards his own goal had to be diverted over the crossbar by Joel Matip.
Monchengladbach were looking to make it 10 games in a row unbeaten at home in the Bundesliga and they again came close on the quarter-hour mark when Peniel Mlapa was well found but failed to test Timo Hildebrand.
The remainder of the opening 45 minutes contained few chances, with both sides wasteful in possession.
After the break the hosts hit the bar within 10 minutes of the restart when Mike Hanke found Granit Xhaka and the Swiss's shot clipped the top of the upright.
Soon after Hildebrand's goalframe was again rattled when Juan Arango curled a shot that Hildebrand appeared to leave only for it to luckily come back off the post.
Monchengladbach continued to look more threatening but it was Schalke who took the lead in the 82nd minute.
Arango gave the ball away and Draxler broke upfield, exchanging passes with Michel Bastos before firing low into the net.
The visitors should have put the game to bed in the final moments but Max Meyer blazed over from close range.
Three points move Schalke six clear of Frankfurt in fifth, while Gladbach remain a point off the final European spot in seventh.