HONG KONG (AP) _ Seventeen mainland Chinese should not be shipped home, their lawyer told a court today, arguing that the Hong Kong government never gave them a chance to prove they had the right to stay.

Attorney Denis Chang told Hong Kong's Court of Final Appeal that his clients' rights were violated by the government's failure to set up any system for such people to show they have a legal right to live in Hong Kong.

The justices also are confronted with the unprecedented and far-reaching question of whether they will go along with Beijing's interpretation of the law in this case.

The Hong Kong government, represented by attorney Geoffrey Ma, says the court should apply Beijing's reading of the law, which was handed down in June.

The Court of Final Appeal had issued a ruling in January that Hong Kong said would flood the territory with immigrants, and the territory's government turned to Beijing for help.

China's National People's Congress told the Court of Final Appeal it had wrongly interpreted Hong Kong's constitution when it found that anyone with at least one Hong Kong parent has the right to live here, even if the parent obtained Hong Kong residency after the person was born.

Beijing and the Hong Kong government contend the right of abode goes only to those whose parents were Hong Kong residents at the time the person was born _ which would drastically cut back the number of potential immigrants.

The immigrants involved in the case before the court say the justices should not consider Beijing's views.

But Ma says Hong Kong will be issuing new removal orders against mainlanders staying here illegally, based on China's interpretation, so the court should go ahead and start ruling accordingly.

The migrants have been allowed to stay ever since the Court of Appeal ruled in June that government removal orders against them were invalid because the government had not set up any bureaucratic procedure for them to apply to stay.

The hearing that is expected to last through the week has attracted dozens of mainland people, who are filling up overflow areas of the court and congregating outside to await any word on their fates.