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. China has been the main beneficiary of the whistle-blower's accusations against the American government, and it will now be spared a prolonged battle in Hong Kong's courts over whether Mr. Snowden should be extradited.
Mr. 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 U.S. leader berated his Chinese counterpart for alleged involvement in large-scale cyber-espionage against the United States.
Mr. Snowden's release of information about America's massive surveillance efforts around the world 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 United States now appears to be guilty of doing the same thing that it was accusing China of doing, and possibly on an even bigger scale.
Mr. 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 United States.
A debate has raged as to whether Mr. 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 behaviour 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 United States, 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 whistle-blowers, 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 U.S. 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 Mr. Snowden.
"I think he saw and read about what our experience was, and that was part of his decision-making," Mr. Binney said.
Until internal procedures are established where whistleblowers are not victimized, people such as Mr. Snowden who are willing to sacrifice their careers, if not their lives, will continue to emerge.
It can be argued that what Mr. Snowden has done will in the long run benefit not just the people of the United States but 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 United States and China.
China is clearly the big winner in the Snowden case. It is now seen as being guilty of behaviour no worse than that of the United States.
The United States stands to lose a great deal more.
Previously, China had the reputation of being a control freak and the United States 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 United States 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 Hong Kong-based journalist.