After pouring billions of dollars into the global fight against malaria and rebranding Microsoft in a more cuddly, human way, Bill Gates had just about shaken off accusations that he represented all that was unappealing about aggressive ­American capitalism.

But today his reinvention suffered something of a setback when he played down China's attempts to stifle dissent on the internet as "very limited".

Less than two weeks after Google said it planned to uncensor its Chinese search engine in protest at attempts to break into the email accounts of human rights activists, Gates criticised his rival's decision and insisted that agreeing to Beijing's demands was just part of doing business in the country. "You've got to decide: do you want to obey the laws of the countries you're in or not? If not, you may not end up doing business there," he told ABC's Good Morning America programme.

He also brushed aside accusations that Microsoft has been complicit in helping filter the web by saying that it was not an issue because any censorship could be circumvented with technical knowledge. "Chinese efforts to censor the internet have been very limited," he said. "It's easy to go around it, so I think keeping the internet thriving there is very important."

Gates's comments echo those last week by Microsoft chief executive, Steve Ballmer, who took a swipe at Google by suggesting that the company had over-reacted in China. "People are always trying to break into other people's data," he said on Friday. "There's always somebody trying to break into Microsoft."

Ballmer also likened Microsoft's complicity in actively filtering internet content to the oil industry's decision to import oil from Saudi Arabia, despite the censorship that takes place there. "If the Chinese government gives us proper legal notice, we'll take that piece of information out of the Bing search engine," adding that even countries with "extreme" free speech laws, such as the US, exercised some censorship.

The comments of both men come despite the fact that efforts to censor the internet in China – a project known as the Golden Shield – are among the most extensive in the world. The country's estimated 300 million internet users are almost all affected by the various blocks and filters, which include direct censorship of anti-government protesters, members of the Falun Gong religious group, Tibetan independence campaigners and the Taiwanese media. At various points, Beijing has also blocked access to international news websites including the BBC and the Guardian, and around 50 Chinese bloggers are in prison as a result of their postings.

Google's stance has drawn widespread support from the human rights community and freedom of speech campaigners, but the Chinese authorities have repeatedly denied any link to the hacking.

Today the government made its most direct response to the issue yet – rejecting suggestions that it turned a blind eye to the activities of some hackers, and defending its right to punish those who challenge its rule.

"Any accusation that the Chinese government participated in cyber attacks, either in an explicit or indirect way, is groundless and aims to denigrate China. We are firmly opposed to that," a government spokesman told the state news agency, Xinhua, adding that China was itself the victim of numerous internet-based attacks.