Hong Kong’s “can-do” spirit has long been admired by visitors to the city, often drawing favourable comparisons to the glacial pace of development elsewhere in the world. Plans to build an express railway linking Hong Kong to China’s extensive high-speed network should, therefore, be easy to achieve. But the plan announced by local officials last week is highly controversial. The railway symbolises pretty much all of the anxieties and problems facing Hong Kong today.

Officials say it will make the city more competitive and enhance integration with mainland China, providing passengers with quick and convenient transport to Beijing, Shanghai and other Chinese cities. But to critics, the rail link appears as a metaphorical arm of the central government reaching into the heart of Hong Kong, further eroding the city’s autonomy and undermining its rule of law. Three legal challenges to the project have been filed within days of the announcement. There is a danger the project will come off the rails.

Mainland China’s criminal law will also apply at Hong Kong’s rail link terminus

The cause of the controversy is the plan to establish a joint port area at a new station for the high-speed line in West Kowloon. Officials say this is crucial to the success of the whole project. Mainland Chinese border controls will sit alongside their Hong Kong counterparts. Passengers leaving or arriving in Hong Kong by the express train will be able to meet all immigration and customs requirements in one place. After boarding, passengers from Hong Kong can travel to mainland stations without further checks. It is not difficult to grasp that this will be convenient for Hong Kong residents, visiting business people and tourists alike.

Why, then, has Hong Kong’s new leader, Carrie Lam Cheng Yuet-ngor described the project as a “hot-potato”? The problem lies with the creation of mainland border controls in Hong Kong. The government intends to give up a quarter of the West Kowloon station to a new “mainland port area”. Mainland Chinese officials will operate in this little part of Hong Kong and they will enforce mainland laws. This will also cover the platforms and trains speeding through Hong Kong on their way to and from the mainland. In simple terms, it means Hong Kong’s rule of law, with its human rights provisions, safeguards and independent courts, will not apply in these areas. This is why reporters are asking what would happen to a passenger wearing a T-shirt marking the Tiananmen Square crackdown, which is permitted under Hong Kong law but likely to lead to trouble in mainland China.

The application of mainland Chinese law in Hong Kong is a highly sensitive issue. Hong Kong has a separate – and very different - legal system. The city’s de facto constitution, the Basic Law, provides strict rules on the use of national laws in Hong Kong. Only 11 are currently in force. When the idea of joint border controls was first raised, democrat politicians and lawyers argued it would not be possible be reconcile such an arrangement with the Basic Law. The government, it seems, came to the same conclusion.

Why is Hong Kong’s cross-border rail link causing such a fuss?

After studying the matter for almost a decade, the solution officials have come up with is to simply lease the new port area to the central government and declare it and the trains to be part of the mainland, even though they are in Hong Kong. This, they say, means that the relevant parts of the Basic Law, concerning the application of national laws in the city, will not apply. They have no legal power to do this so will need approval from Beijing’s National People’s Congress Standing Committee. An attempt will then be made to pass local laws to implement the project.

This is an expedient approach and one fraught with legal dangers. If the port area can suddenly be deemed to be “on the mainland” why not other parts of the city? Maybe the Peak Tram will be next. Perhaps Discovery Bay, a residential area popular with expats, will be deemed part of the mainland and become a resort for retired Communist Party officials. Maybe, parts of town occupied by pro-democracy protestors will be temporarily leased to the central government so that the mainland’s tough public order laws can be applied.

Hong Kong leader inspects high-speed train and stresses need for mainland Chinese officials at city terminus

Hong Kong officials have been quick to dispel such fears, pointing out that they are far-fetched and reminding everyone that this is only being done for a railway. But there can be no denying that it sets a worrying legal precedent. The government should have at least attempted to reconcile arrangements for the border controls with the constitutional requirements in the Basic Law. This was done for laws governing the Chinese army garrison in Hong Kong and has worked well. It could have put forward much more limited proposals for the border arrangements, restricting applicable mainland laws to immigration and custom matters, rather than the nuclear option of importing them wholesale.

The project now faces many hurdles. There will be protests, court hearings, and battles in the Legislative Council. It has plunged the city into a new round of political in-fighting and risks further undermining confidence in the increasingly fragile “one country, two systems” concept and rule of law. Hong Kong will eventually get its smart new railway, bringing convenience to passengers. But it is likely to come at a much greater cost than the HK$84.4 billion price tag.

Cliff Buddle is the editor of special projects at the South China Morning Post