COSCO Shipping occupies a prime waterfront location in Hamburg. The Chinese marine transportation giant’s European headquarters sit between a historic red-brick warehouse complex and the glass and steel of the redeveloped harbor area. The company is about to expand its presence after striking a deal last month to acquire a stake in a container terminal.

For a city that markets itself as China’s gateway to Europe, the agreement is a step toward becoming a go-to hub for COSCO’s vast cargo shipments. But away from the business of trade that Hamburg has thrived on for centuries, the tighter embrace of China is stirring concerns.

The dilemma is whether such economic ties now leave Hamburg exposed to the vagaries of great power politics as tensions between the U.S. and China spill into global supply chains. Its status as Germany’s biggest port also puts it at the heart of a broader debate over the country’s role as Europe’s political heavyweight and the world’s No. 3 exporter.