HONG KONG (AP) — By holing up in Hong Kong, the American defense contractor who says he leaked information on classified U.S. surveillance programs has found an unlikely refuge from extradition.

It might be temporary, however. Hong Kong’s protection of Edward Snowden is not a given.

As a former British colony, the territory has a well-established, Western-style legal system. It is home to a boisterous media and outspoken public that ardently defend their rights to expression. And though a semi-autonomous part of China, it ultimately answers to Beijing, which is often at odds with Washington.

That combination of sturdy legal institutions and strong political backing made Hong Kong an attractive place to take shelter, said Guardian journalist Glenn Greenwald, whose reports last week that exposed widespread U.S. government programs to collect telephone and Internet records were based on information from Snowden.

“There were no good options for him, so it just became a question of weight of all the various factors,” Greenwald said in Hong Kong on Monday. “There were probably other places that were more democratic but that would be more likely to hand him over to the United States because they wouldn’t want to resist the pressure that the United States would undoubtedly apply to get him.”

However, the U.S. is one of the largest investors in Hong Kong, a major business center for East Asia. The U.S. and Hong Kong also have an extradition treaty and routinely cooperate on requests to transfer criminals; in one high-profile case, Hong Kong extradited three al-Qaeda suspects to the U.S. in 2003.

While Beijing at times stands up to Washington, it may not want to for Snowden. Beijing has often criticized foreign governments for harboring critics of its Communist government. China also is seeking U.S. cooperation on retrieving corrupt Chinese officials who have fled to America, often with sizeable assets. Cyberhacking and cyberespionage have emerged as the newest friction in relations that Presidents Barack Obama and Xi Jinping pledged over the weekend to improve.

“I can’t imagine that after all this effort, they’re going to let this one thing make a mess of it,” said David Zweig, an expert on Chinese politics at the Hong Kong University of Science and Technology.

Still, the extradition treaty gives Hong Kong ways to say “no.” The U.S. and Hong Kong concluded the treaty with Beijing’s blessing on the eve of the territory’s hand back from Britain to China in 1997. Provisions allow one side to refuse a request if it’s deemed to be politically motivated or if the suspect is unlikely to receive a fair trial.

Beijing may also have a veto. The treaty allows Beijing to refuse to extradite a Chinese national for reasons of national security. A study by the U.S. Senate Foreign Relations Committee in 1997 suggests Beijing may have wider discretion to prohibit any extradition, not just of Chinese nationals, on national security grounds.

Snowden’s greatest ally, however, may be the Hong Kong court system. Extraditions, if contested, can drag on for years. Hong Kong’s high court in a ruling on a case concerning three African asylum-seekers ordered authorities to devise a unified standard for assessing asylum applications. The ruling effectively puts applications on hold until the new system is in place.

Snowden checked out of Hong Kong’s Mira Hotel on Monday. Greenwald, who declined to say where Snowden is currently, said he did not think the contractor had applied for asylum anywhere but that his strategy was simple.

“I think that his goal is to avoid ending up in the clutches of the U.S. government for as long as he can, knowing full well though that it’s very likely that won’t succeed and he will end up exactly where he doesn’t want to be,” Greenwald said.