St Pauli were all but relegated from the Bundesliga as they slipped to defeat at Kaiserslautern.
A goal in each half from Christian Tiffert and Matthias Abel handed the points to the hosts, who eased their own relegation fears in reaching the 40-point mark.
The defeat leaves St Pauli rooted to the bottom of the table and six points below Cologne, who will condemn them to the drop if they claim a point against Bayer Leverkusen tomorrow.
It was the Hamburg club who threatened first after 11 minutes, when Matthias Lehmann fired in a left-foot shot from 25 yards in an attempt to catch Kevin Trapp unawares, but the Lautern keeper saw it all the way.
The hosts took the lead after 28 minutes to the relief of most of the capacity crowd inside the Fritz-Walter-Stadion.
Leon Jessen whipped in a cross and Tiffert rose above the St Pauli defence to direct a header into the bottom left corner from eight yards.
Five minutes before the break, a beautifully weighted pass from Charles Takyi found Gerald Asamoah, who fired a right-footed shot from inside the box but Trapp parried the ball clear.
Just before the hour mark, Lehmann threatened again, finding space on the edge of the box before working a shooting angle and firing in a strike, but it was straight at Trapp.
Lautern scored again after 68 minutes.
Tiffert turned provider as he swung in a cross and Abel powered a header into the top corner.
As full-time approached, Max Kruse played in a great ball to find Marius Ebbers, but he scooped the ball over the bar, leaving St Pauli on the brink.