China's embassy in Kenya has denied a Reuters news agency report that Chinese hackers attacked key state agencies in the capital, Nairobi, including the presidency.
This was reportedly done to assess whether the East Africa nation would service billions of dollars owed to Beijing.
The years-long cyber-attacks started in 2019 when the Chinese started closing credit taps to Kenya as debt strains started showing, according to Reuters.
But the Chinese embassy said the report was "far-fetched and sheer nonsense", in a statement on Wednesday.
"Hacking is a common threat to all countries and China is also a victim of cyber-attack," it added.
The embassy says it is a highly sensitive political issue to blame a certain government for a cyber-attack without solid evidence.
It says the ties between Kenya and China are founded on mutual respect.
"China and Kenya are good friends, good partners and good brothers," the embassy spokesperson said.
Kenya has reportedly cut borrowing from China. As of March it owed the south-eastern Asian country $6.31bn (£5.8bn).