Bundesliga - Ribery's late winner downs Bremen
Second-placed Bayern Munich kept the title race going for as long as they could when Franck Ribery scored in the last minute to give them a 2-1 win at Werder Bremen after Naldo had scored at both ends.
Although Borussia Dortmund later secured the Bundesliga title when they beat Borussia Moenchengladbach 2-0, the win guaranteed Bayern Champions League football next season.
Schalke, in the third direct Champions League place, have 57 and fourth-placed Gladbach 56 in the Champions League playoff spot.
At the other end of the table, Kaiserslautern were relegated after two seasons in the top flight despite beating fellow strugglers Hertha Berlin 2-1 away to end a 21-match winless run.
The result plunged second-bottom Hertha into further trouble while Cologne, who are 16th and in the relegation playoff place, also dropped points at home in a 1-1 draw with VfB Stuttgart.
Hamburg SV, the only ever-present team since the Bundesliga was founded in 1963, eased their relegation worries with a 1-1 draw at Nuremburg.
Bayern had recently publicly renounced any pretensions of winning the Bundesliga, preferring to focus on reaching the final of the Champions League, which will be played in their own stadium.
They visit Real Madrid for the second leg of their semi-final on Wednesday, having won the first leg 2-1 last Tuesday.
They made eight changes to the side which beat Real and fell behind in the 51st minute when Claudio Pizarro headed on a corner and Naldo fired home from close range.
With Werder dominating, Bayern brought on top scorer Mario Gomez and Ribery. The Frenchman had only been on for a few minutes when he broke down the left and sent over a low cross that Naldo, under no pressure, side-footed into his net from 12 metres.
Then Ribery wriggled past his marker and placed a low shot into the far corner.
Kaiserslautern stunned Hertha when Oliver Kirch and Andrew Wooten scored in a 12-minute spell before halftime.
Peter Niemeyer replied on the hour for Hertha, although he was later sent off for a second bookable offence. Hertha, promoted last season, are two points adrift of Cologne.