the city belonged for a long time to hamburg