Gerald Asamoah grabbed the only goal of the game as St Pauli moved clear of the relegation battle by beating Hamburg.
The Germany international headed home early in the second half to give the visitors the three points and climb to 11th in the table, five points clear of the bottom three.
Hamburg remain seventh, four points off a Europa League spot.
The hosts completely dominated the opening half as St Pauli struggled to cope with an aerial bombardment of 27 crosses into their box.
Anis Ben-Hatira headed wide from a Dennis Aogo cross in the early stages before a Guy Demel flick saw Ruud van Nistelrooy and Mladen Petric narrowly fail to convert.
A rare St Pauli attack forced Hamburg's Marcell Jansen to clear a diving header from Markus Thorandt off the line, before Van Nistelrooy headed straight at the keeper from another Aogo centre.
Ze Roberto shot into the side-netting shortly after the break before the hosts were stunned as the visitors grabbed the crucial goal.
A corner from Max Kruse found Asamoah free at the near post to glance home in the 59th minute.
And from that point on St Pauli were the better side with Marius Ebbers forcing Frank Rost to make a stunning save from his header while Kruse shot straight into the arms of the keeper as they attempted to extend their lead.
Eljero Elia had a late chance to grab an equaliser put pulled his effort wide of the target.
The Germany international headed home early in the second half to give the visitors the three points and climb to 11th in the table, five points clear of the bottom three.
Hamburg remain seventh, four points off a Europa League spot.
The hosts completely dominated the opening half as St Pauli struggled to cope with an aerial bombardment of 27 crosses into their box.
Anis Ben-Hatira headed wide from a Dennis Aogo cross in the early stages before a Guy Demel flick saw Ruud van Nistelrooy and Mladen Petric narrowly fail to convert.
A rare St Pauli attack forced Hamburg's Marcell Jansen to clear a diving header from Markus Thorandt off the line, before Van Nistelrooy headed straight at the keeper from another Aogo centre.
Ze Roberto shot into the side-netting shortly after the break before the hosts were stunned as the visitors grabbed the crucial goal.
A corner from Max Kruse found Asamoah free at the near post to glance home in the 59th minute.
And from that point on St Pauli were the better side with Marius Ebbers forcing Frank Rost to make a stunning save from his header while Kruse shot straight into the arms of the keeper as they attempted to extend their lead.
Eljero Elia had a late chance to grab an equaliser put pulled his effort wide of the target.