An arrest warrant for Edward Snowden is very likely on the way, bringing what looks to be a complex legal tussle to the courts of Hong Kong. The city of about 7 million is a Special Administrative Region, or SAR, of China, but boasts separate courts and a good deal of legal autonomy. Nevertheless, Washington and Hong Kong maintain an extradition treaty, and a U.S. Justice Department official revealed on Tuesday that charges — possibly treason or aiding the enemy — are “under discussion.” Snowden now seems at the mercy of China’s “one country, two systems” arrangement. Here is what you need to know:

What’s the current situation?

It appears that Snowden flew into Hong Kong on May 20 and was granted the standard 90-day tourist visa for U.S.-passport holders. Therefore, he should be permitted to remain until Aug. 18, after which he will likely have to file an asylum claim or fall foul of his “condition of stay.” Snowden cannot make an asylum (technically “nonreturn”) claim until his current visa expires. However, if the U.S. files charges and an arrest warrant is issued, he would then be able to claim asylum immediately on that basis.

Hong Kong offers asylum to those threatened by torture; by cruel, inhuman or degrading treatment or punishment (CIDTP); or to refugees subject to persecution. Procedures for torture claims are clearly defined in new legislation, but the second two are somewhat subject to interpretation. Until recently, the U.N. High Commissioner for Refugees solely decided refugee applications in Hong Kong. However, this was found to be insufficient and unlawful. A consequence of this is that no refugee applicants can currently be sent home because their claims are officially still pending.

Professor Simon Young, director of the Centre for Comparative and Public Law at Hong Kong University, says Hong Kong authorities will likely follow existing protocol until dedicated statutes are put in place. “Refugee-status determination focuses on the specific situation of the individual claimant,” Kelley Loper, a board member of the Hong Kong Refugee Advice Centre, tells TIME. This means that refugee claimants can come from any country, even democratic states generally considered to respect human rights.

What if the U.S. requests extradition?

Technically, Hong Kong can only “surrender” Snowden, because “extradition” takes place between sovereign states (like the People’s Republic of China). Surrender requests are made through diplomatic channels to Hong Kong’s Chief Executive, who could then ask a magistrate to issue an arrest warrant. Bail is generally only granted under special circumstances.

There are various restrictions on the surrender of persons, like if the prosecution is deemed political. There is also double criminality: the offense must be both specified in the treaty (Article 2 regarding “offenses with computers” could apply) and must carry a penalty of at least one year in jail in both jurisdictions. Those accused of a capital crime can only be surrendered with guarantees that the death sentence will be commuted.

For torture nonreturn claims, surrender cannot be made before the torture claim has been finally determined through the procedures above. Judging by the case of Bradley Manning, whose treatment while facing similar accusations raised concerns with the U.N. torture export, this could theoretically hold water. CIDTP claims are still in limbo. “One assumes, however, that they will have the same effect as torture nonreturn claims, in which case a person cannot be surrendered while his asylum claim is still pending,” says Young.

Of course, the law is only important if it is obeyed. Libyan dissident Sami al-Saadi was placed on a secret rendition flight from Hong Kong to Tripoli in 2004, an operation that was allegedly planned and executed by the U.K., U.S. and Libyan governments. Cori Crider, a lawyer representing al-Saadi for the Reprieve legal-rights group, tells TIME that her client was simply “kidnapped” and subjected to “no process at all.” Whether this could be repeated with someone as high profile as Snowden remains to be seen.

New Chinese President Xi Jinping met Barack Obama for the first time last weekend, just hours before Snowden’s identity and hiding place became global news. The two superpowers are enjoying unprecedented cordial relations and will want this dilemma resolved quickly. “The body language [is] of two leaders willing to keep working with each other to avoid a downward spiral,” says Professor Zha Daojiong of Peking University’s School of International Studies.

Legally, influence may be trickier to seed. While the People’s Republic can issue instructions to the Hong Kong Chief Executive regarding “matters of defense or foreign affairs,” these cannot contradict existing statutes like the extradition treaty. In addition, Article 19 of Hong Kong’s Basic Law — the SAR’s quasi constitution — protects the independence of the judiciary from even Beijing. This means that the Chinese government should not be able to influence or interfere with asylum proceedings.

However, there could possibly be room to maneuver if Hong Kong wanted to pass on this hot potato. The Hong Kong Court of Final Appeal (the territory’s highest court) can request a reinterpretation of the Basic Law from the Standing Committee of the National People’s Congress in Beijing. Any such decision still ostensibly sits with the territory, however. So it seems that for the moment, at least, Snowden’s fate rests with Hong Kong.