Hamburg looked set to return to the Bundesliga after beating Hertha Berlin in the first leg of the relegation playoff, but the Berliners pulled off a dramatic great escape, turning the tie on its head in the second leg to secure their place in the top flight next season.