Berlin: The government ministries of both China and Germany have reached a deal on a compromise to allow Chinese shipping group COSCO to take a smaller stake in the controversial Hamburg port deal than previously decided as Beijing's political tactics have been widely seen as a national security risk by countries, US-based publication Politico reported.

The deal has reportedly allowed a Chinese firm to take stakes in one of the terminals of the controversial Hamburg port.

The decision comes straight after several media reports revealed that German leader Olaf Scholz's chancellery tried to push the deal through despite concerns from multiple ministries.

After the final approval of the deal, it will allow Chinese company Cosco to buy only 24.9 per cent instead of 35 per cent of the shipping company that runs the terminal, Politico reported.

Russia's invasion of Ukraine has made the issue politically sensitive as China's quest to emerge as a global superpower has sparked security concerns amongst western nations.

Hans-Jorg Heims, the spokesperson for HHLA, said that his company was "engaged in constructive talks with the German government."

The possibility of lowering Cosco's shares had been discussed, Heims said. "We could envisage this, but that's also up to CSPL [Cosco shipping]," he said, adding that he expects a final compromise to be found before a legal deadline for reviewing the investment runs out on October 31, according to Politico.

Notably, the Chinese firm Cosco already has stakes in Europe's two largest ports at Rotterdam and Antwerp.

It also controls the port of Piraeus in Athens and is ready to initiate its plans to expand an inland rail terminal at Duisburg.