The month-long sojourn of former National Security Agency contractor Edward Snowden on Chinese soil ended with his departure for Moscow and other parts after Hong Kong’s refusal to issue a warrant for his arrest despite an American request.

From China’s standpoint, this is the best resolution possible. It has been the main beneficiary of the whistleblower’s accusations against the American government, and it will now be spared a prolonged battle in the Hong Kong courts over whether Snowden should be extradited.

Snowden turned up in the former British colony at roughly the same time as a summit meeting between U.S. President Barack Obama and Chinese President Xi Jinping in California, at which time the American leader berated his Chinese counterpart for alleged involvement in large-scale cyber espionage against the United States

Snowden’s release of information about massive U.S. surveillance efforts worldwide had the effect of depicting Washington as hypocritical if not worse and lent support to Beijing’s allegations that it was the victim, not the perpetrator, of cyber attacks.

At the very least, in the eyes of many people, the U.S. now appears to be guilty of doing the same thing that it was accusing China of doing, and possibly on an even bigger scale. Obama’s assurances to Americans that the U.S. government was not listening in on their phone calls or reading their e-mails exacerbated anger and suspicion in Europe and elsewhere that Washington was spying on them and, indeed, on everyone else, regardless of whether they were allies of the U.S.

A debate has raged as to whether Snowden is indeed a whistleblower or simply a leaker of sensitive information.

He is undoubtedly a whistleblower, drawing attention to what many consider to be unconstitutional and possibly unlawful behavior on the part of U.S. government intelligence agencies.

But the fact that he has gone on to detail what the American government has done in foreign countries, such as China, will cause some to call him a traitor.

The genie is out of the bottle and cannot be put back in. Within the U.S., there is a need for a wide-ranging debate regarding the extent to which Americans are willing to give up their privacy in return for security.

This is a debate that should have been triggered long ago, by previous NSA whistleblowers, such as Bill Binney, J. Kirk Wiebe and Tom Drake, who attempted to play by the rules and made their complaints within the system rather than going to the media.

According to an Asia Times article by Peter Lee, these three men told “the Inspector General of the Department of Defense and oversight committees of the US Congress” about waste and wrongdoing at the NSA. Despite their trying to work within the system, their careers were cut short. Their homes were raided by the FBI.

Recently, in an interview with USA Today, all three were openly sympathetic with Snowden.

“I think he saw and read about what our experience was, and that was part of his decision-making,” Binney said.

Until internal procedures are established where whistleblowers are not victimized, people such as Snowden who are willing to sacrifice their careers, if not their lives, will continue to emerge.

It can be argued that what Snowden has done will benefit not just the people of the U.S. but also people around the world. As he said: “The NSA has built an infrastructure that allows it to intercept almost everything. With this capability, the vast majority of human communications are automatically ingested without targeting.”

The Snowden saga is being played out against the larger background of the global contest for influence by the U.S. and China.

China is clearly the big winner in the Snowden case. It is now seen as being guilty of behavior no worse than that of the U.S. The U.S. stands to lose a great deal more.

Previously China had the reputation of being a control freak and the U.S. was seen as a bulwark for democracy and human rights. But now, Washington stands accused not just of spying on its own citizens — as is done by the Chinese government — but of intruding into the private communications of virtually every person in the world.

There is the real danger that, from now on, the U.S. will be seen by the rest of the world as not being much different from China. The reaction may well be “a plague on both your houses.”

Frank Ching is a political commentator and journalist based in Hong Kong. (Frank.ching@gmail.com)